// 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
	if(ieversion>=7){	animated();	}
}

if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x
	var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
	if(ffversion>=2){	animated();	}
}

function animated()
{
	//alert("Your browser is good enough!" + browser + " " + version);
	$(document).ready(function(){
		var lists = $("div.productionYearNav");
		var firstList = $("div.productionYearNav:first");
		var expandLinks = $("a.expandable");
		var selectedYear = $("#selectedYear").val();
		
		lists.css("display","none");
		
		if(selectedYear != '')
		{
			if(selectedYear.match("200") != null){	$("div.productionYearNav:eq(0)").css("display","block");	};
			if(selectedYear.match("199") != null){	$("div.productionYearNav:eq(1)").css("display","block");	};
			if(selectedYear.match("198") != null){	$("div.productionYearNav:eq(2)").css("display","block");	};
			if(selectedYear.match("197") != null){	$("div.productionYearNav:eq(3)").css("display","block");	};
		}
		else
		{	firstList.css("display","block");	}
		
		expandLinks.click(function(){
			var idx = expandLinks.index(this);
			lists.slideUp(500);
			$("div.productionYearNav:eq("+idx+")").slideDown(500);
		});
		
		
	});
}
