// JavaScript Document

		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
		{ //test for MSIE x.x;
			var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
		}
		else
		{
			var ieversion=-1;
		}
		
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
		{ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
			var ffversion=new Number(RegExp.$1); // capture x.x portion and store as a number
		}
		else
		{
			var ffversion=-1;
		}
		
		var show_slider = false;
		if(ieversion>7)
		{
			show_slider = true;
		}
		else if(ieversion==-1 && ffversion==-1)
		{
			show_slider = true;
		}
		else if(ieversion==-1 && ffversion>=4)
		{
			show_slider = true;
		}
		
		
		if(show_slider)		
		{
			var previous;
			var tabs = new Array();
			// Set up Sliders
			// **************
			$(function(){
			//$(document).ready(function() {
				$('#slider1').anythingSlider({
					resizeContents      : true, // If true, solitary images/objects in the panel will expand to fit the viewport
					
					buildStartStop      : false,
					
					autoPlay            : true,
					
					delay               : 4000,
					
					onSlideBegin  : function(slider) {
						previous = $('#slider1').data('AnythingSlider').currentPage;
					},
					
					onSlideComplete  : function(slider) {
						var current = $('#slider1').data('AnythingSlider').currentPage;
						
						$("a[class^='panel"+previous+"']").html($('#panel_title_'+previous).html());
						$("a[class^='panel"+previous+"']").unbind('click.mynamespace');
						
						$("a[class^='panel"+current+"']").html($('#panel_title_text_'+current).html());
						$("a[class^='panel"+current+"']").bind('click.mynamespace', function() { 
							window.location.href = $('#linkPanel'+current).html();
						});

					},
					
					onInitialized  : function(slider) {
						//set navigation tabs
						var panels = $('[id*="panel_title_text_"]');
						for(var i=1; i<=panels.length; i++) 
						{
							$("a[class^='panel"+i+"']").html($('#panel_title_'+i).html());
						}
						
						//$("a[class^='panel1']").click();
						
						$("a[class^='panel1']").html($('#panel_title_text_1').html());
						$("a[class^='panel1']").bind('click.mynamespace', function() { 
							window.location.href = $('#linkPanel1').html();
						});
					}
				});

			});
		}
		else
		{
			//show only a static image for ie versions smaller than 8
			$(document).ready(function() {
				var panel1 = $('.panel1').html();
				$('#slider1').html('<li class="panel1">'+panel1+"</li>");
			});
		}

