		//This sets the blueswitch link's mouseover
		window.onload = SetUpBSLink;
		
		function SetUpBSLink(){
			$('#blue').mouseover(ChangeLink);
			$('#switch').mouseover(ChangeLink);
			
			$('#blue').mouseout(ChangeLinkOut);
			$('#switch').mouseout(ChangeLinkOut);
		}

        function ChangeLink() {
        	$('#blue').addClass('over');
        	$('#switch').addClass('over');
        }

        function ChangeLinkOut() {
        	$('#blue').removeClass('over');
        	$('#switch').removeClass('over');
        }

        function GetWidth() {
            var x = 0;
            if (self.innerHeight) {
                x = self.innerWidth;
            }
            else if (document.documentElement && document.documentElement.clientHeight) {
                x = document.documentElement.clientWidth;
            }
            else if (document.body) {
                x = document.body.clientWidth;
            }
            return x;
        }

        function GetHeight() {
            var y = 0;
            if (self.innerHeight) {
                y = self.innerHeight;
            }
            else if (document.documentElement && document.documentElement.clientHeight) {
                y = document.documentElement.clientHeight;
            }
            else if (document.body) {
                y = document.body.clientHeight;
            }
            return y;
           }

           function ShowDropdown(id) {
           	$('#' + id).css('display', 'block');
           }

           function ShowDropdownWithPosition(id, left_position) {
           	$('#' + id).css('left', left_position).css('display', 'block');
           }

           function HideDropdown(id) {
           	$('#' + id).css('display', 'none');
           }

           function AddSlideshowElement(img_src, link_url) {
           	current_controls = $('.Control').length;

           	control_class = 'Control';
           	image_css = 'display:none;opacity:0;';
           	
           	//If this is the first slideshow element, set it as selected
           	if (current_controls == 0) {
           		control_class += ' Selected';
           		image_css = 'display:block;opacity:1.0;';
           	}

           	$('.SlideshowControls').append('<div class="' + control_class +
           	     '" onclick="SetSelectedSlideshow(' + (current_controls + 1) + ')">' + (current_controls + 1) + '</div> ');


           	$('.Slideshow').append('<a href="' + link_url + '"><img class="SlideshowImage" style="' + image_css + '" src="' + img_src + '" /></a>');
           }

           function SetSelectedSlideshow(element_num) {
           	element_num -= 1;
           	
           	$('.SlideshowControls .Control').removeClass('Selected');
           	$($('.SlideshowControls .Control')[element_num]).addClass('Selected');

           	$('.Slideshow .SlideshowImage').css('opacity', 0).css('display', 'none');
    
           	$($('.Slideshow .SlideshowImage')[element_num]).css('display',  'block');
           	$($('.Slideshow .SlideshowImage')[element_num]).animate({opacity: 1.0}, 600);
           }


           var brands_width = 856;
           var moving = false;

           function ScrollBrandsLeft() {
           	if (!moving) {
           		if ($('.HomeBrandsFilm').position().left < 0) {
           			$('.HomeBrandsFilm').animate({ left: '+=' + brands_width + '' }, 800, function() { moving = false });
           			moving = true;
           		}
           	}
           }

           function ScrollBrandsRight() {
           	if (!moving) {
           		if ($('.HomeBrandsFilm').position().left > -$('.HomeBrandsFilm').width() && $('.HomeBrandsFilm').width() - (-$('.HomeBrandsFilm').position().left) > brands_width) {
           			$('.HomeBrandsFilm').animate({ left: '-=' + brands_width + '' }, 800, function() { moving = false });
           			moving = true;
           		}
           	}
           }

