		// Drop Downs
		$(document).ready(function(){ 
			$("ul.sf-menu").supersubs({ 
				minWidth:    12,   // minimum width of sub-menus in em units 
				maxWidth:    27,   // maximum width of sub-menus in em units 
				extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
								   // due to slight rounding differences and font-family 
			}).superfish();  // call supersubs first, then superfish, so that subs are 
							 // not display:none when measuring. Call before initialising 
							 // containing tabs for same reason. 
		}); 	 
		
		// Sidebar
		$(document).ready(function() {
			// Slide
			// Expand only the active menu, which is determined by the class name
			$("#menu1 > li > a[class=expanded]").find("+ ul").slideToggle("medium");
		
			// Toggle the selected menu's class and expand or collapse the menu
			$("#menu1 > li > a").click(function() {
				$(this).toggleClass("expanded").toggleClass("collapsed").find("+ ul").slideToggle("medium");
			});
		
		});
		
		// FANCYBOX POP-UPS
		$(document).ready(function() {
		// Product Specs Pop up
			$("#product_specs").fancybox();
			$("#product_specs2").fancybox();
			$("#product_specs3").fancybox();
			$("#product_specs4").fancybox();
		// Additional Charges Pop up
			$("#addl_charges").fancybox();
		// Product Specs Pop up
			$("#suspension_info").fancybox();
		// Color Picker Pop ups
			$("#color01").fancybox();
			$("#color02").fancybox();
			$("#color03").fancybox();
			$("#color04").fancybox();
			$("#color05").fancybox();
			$("#color06").fancybox();
			$("#color07").fancybox();
			$("#color08").fancybox();
			$("#color09").fancybox();
			$("#color10").fancybox();
		// Wrap Gallery Pop up
			$("a[rel=gallery1], a[rel=gallery2], a[rel=gallery3]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'padding'			: 0,
				'titlePosition'		: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
		});
		
		// TEAM HARD HATS Slideshow
		function slideSwitch() {
			var $active = $('#slideshow IMG.active');
		
			if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
		
			// use this to pull the images in the order they appear in the markup
			var $next =  $active.next().length ? $active.next()
				: $('#slideshow IMG:first');
		
			// uncomment the 3 lines below to pull the images in random order
			
			// var $sibs  = $active.siblings();
			// var rndNum = Math.floor(Math.random() * $sibs.length );
			// var $next  = $( $sibs[ rndNum ] );
		
		
			$active.addClass('last-active');
		
			$next.css({opacity: 0.0})
				.addClass('active')
				.animate({opacity: 1.0}, 1000, function() {
					$active.removeClass('active last-active');
				});
		}
		
		$(function() {
			setInterval( "slideSwitch()", 3000 );
		});
		
		// Alt Product Images
		if (document.images) {
		image1 = new Image;
		image2 = new Image;
		image3 = new Image;
		image1.src = 'images/product_imgs/product_image.jpg';
		image2.src = 'images/product_imgs/altImg_1.jpg';
		image3.src = 'images/product_imgs/altImg_2.jpg';
		} else {
		image1 = '';
		image2 = '';
		image3 = '';
		document.rollimg = 'images/product_imgs/product_image.jpg';
		}			
		
		// Index and Product Page Ad Rotator
		(function ($) {
        $.fn.fadeTransition = function(options) {
          var options = $.extend({pauseTime: 7000, transitionTime: 2000}, options);
          var transitionObject;

          Trans = function(obj) {
            var timer = null;
            var current = 0;
            var els = $("> *", obj).css("display", "none").css("left", "0").css("top", "0").css("position", "absolute");
            $(obj).css("position", "relative");
            $(els[current]).css("display", "block");

            function transition(next) {
              $(els[current]).fadeOut(options.transitionTime);
              $(els[next]).fadeIn(options.transitionTime);
              current = next;
              cue();
            };

            function cue() {
              if ($("> *", obj).length < 2) return false;
              if (timer) clearTimeout(timer);
              timer = setTimeout(function() { transition((current + 1) % els.length | 0)} , options.pauseTime);
            };
            
            this.showItem = function(item) {
              if (timer) clearTimeout(timer);
              transition(item);
            };

            cue();
          }

          this.showItem = function(item) {
            transitionObject.showItem(item);
          };

          return this.each(function() {
            transitionObject = new Trans(this);
          });
        }

      })(jQuery);
    
      var page = {
        tr: null,
        init: function() {
          page.tr = $(".area").fadeTransition({pauseTime: 5000, transitionTime: 1000});
          $("div.navigation").each(function() {
            $(this).children().each( function(idx) {
              if ($(this).is("a"))
                $(this).click(function() { page.tr.showItem(idx); })
            });
          });
        },

        show: function(idx) {
          if (page.tr.timer) clearTimeout(page.tr.timer);
          page.tr.showItem(idx);
        }
      };

      $(document).ready(page.init);   