$(document).ready(function() {
	var el_text = jQuery.trim($("#menu_num").text());
	$(el_text).addClass('cur');
	var fillfon = function() {
		if(el_text!="#li_0"){
			if(!$.cookie("not_first")){
				$("#flashContent").css('display','none');
				var height= $("#container-content").height()+30;
				var width = $("#container-content").width();
				$("#bigimgfon").css( {
					width: "100%",
				    height:height+"px"
				});
				$("#bigimgfon").show();
				$("#bigimg").show();
				$("#discl").show();
			}
		}
	}
    fillfon();

	$("#accept").click(function(){
		$("#flashContent").css('display','block');
		$("#bigimgfon").hide();
   		$("#bigimg").empty().hide();
   		$("#discl").hide();
   		$.cookie("not_first", "true", {
   			expires: 36500,
			path: "/"
		});
		return false;
	});

    $(".one_news.open h2").live('click', function(e){
    	$(this).parent().removeClass('open');
    	$(this).parent().addClass('closed');
    	e.preventDefault();
	});
	 $(".one_news.closed h2").live('click',function(e){
    	$(this).parent().removeClass('closed');
    	$(this).parent().addClass('open');
    	e.preventDefault();
	});
	var clear_serv = function(){
		$('#circ_1_h').css('display','none');
		$('#circ_2_h').css('display','none');
		$('#circ_3_h').css('display','none');
		$('#circ_1').css('display','block');
		$('#circ_2').css('display','block');
		$('#circ_3').css('display','block');
	};
	$('#circ_1_map').hover(function(){		clear_serv ();
		$('#circ_1').css('display','none');
		$('#circ_1_h').css('display','block');
	});
	$('#circ_2_map').hover(function(){		clear_serv ();
		$('#circ_2').css('display','none');
		$('#circ_2_h').css('display','block');
	});
	$('#circ_3_map').hover(function(){		clear_serv();
		$('#circ_3').css('display','none');
		$('#circ_3_h').css('display','block');
	});
	$('#circ_1_map').mouseout(function(){		 clear_serv();	});
	$('#circ_2_map').mouseout(function(){
		 clear_serv();
	});
	$('#circ_3_map').mouseout(function(){
		 clear_serv();
	});
	$(".value.open h4").live('click', function(){
    	$(this).parent().removeClass('open');
    	$(this).parent().addClass('closed');
	});
	 $(".value.closed h4").live('click',function(){
    	$(this).parent().removeClass('closed');
    	$(this).parent().addClass('open');
	});
	$('#awards_2 img').hover(function(){
		var id = $(this).attr('id');
		var str1 = $(this).next().text();
		var str2 = $(this).next().next().text();

		var top = Math.round((2*$(this).position().top+$(this).height())/2)-40;
  		var left = $(this).position().left+$(this).width()+3;
        if ($.browser.msie && $.browser.version == 6) {
  			top = Math.round((2*$(this).position().top+$(this).height())/2)-50;
  		}
        var top1 = 500;
		$('.mes_2').css('display','block');
	  	$('.mes_2').css({'top':top, 'left':left});
	    $('.mes_2 h4').text(str1);
	    $('.mes_2 p').text(str2);
	});
	$('#awards_2 img').mouseout(function(){
		$('.mes_2').css('display','none');
	});
	$('#awards img').hover(function(){
		var str1 = $(this).next().text();
		var top = Math.round((2*$(this).position().top+$(this).height())/2)-35;
  		var left = $(this).position().left+Math.round(0.5*$(this).width())+54;
        if ($.browser.msie && $.browser.version == 6) {
  			top = Math.round((2*$(this).position().top+$(this).height())/2)-50;
  		}
		$('.mes_2').css('display','block');
	  	$('.mes_2').css({'top':top, 'left':left});
	    $('.mes_2 p').text(str1);
	});
	$('#awards img').mouseout(function(){
		$('.mes_2').css('display','none');
	});
});
