var op = $.browser.opera;
$(document).ready(function(){
	$("#country_selector,#lang_selector").change(function(){
		window.location.href = $(this).val();
	});
	
	$("#tabs li").mouseover(function (){
	    cl = $(this).attr("class");
		if (cl == "parents"){
			$("li.parents>ul").hide();
		}
		if (cl == "sections"){
			$("li.sections>ul").hide();
		}
		$(this).children("ul").show();
	});
	
	$("li.parents").each(function(){
		var offset = $(this).position().left;
		$(this).children("ul").css("left","-"+(offset-24)+"px");
	});
	
	if ($("#container").height() < $(document.body).height()-270){
		$("#container").height($(document.body).height()-270)
	}
	
	$(window).resize(function(){
	    if ($("#container").height() < $(document.body).height()-270){
			$("#container").height($(document.body).height()-270)
		}
	});
});
