// JavaScript Document
$(document).ready(function(){
    lastBlock = $("#a1");
    maxWidth = 660;
    minWidth = 100;	

    $("#sliderTop ul li").live("click", function(e){
		//e.preventDefault();
        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
		$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
		lastBlock = this;
      }
    );
});
	
$(document).ready(function(){

	$('#openCloseIdentifier').hide();
	
	$(".topMenuAction").click( function(e) {
		
		e.preventDefault();
		
		if ($("#openCloseIdentifier").is(":hidden")) {
			$("#slider").animate({ 
				marginLeft: "259px"
				}, 500 );
			$("#topMenuImage").html('<img src="/templates/template-winter/top-nav-slider-open.png" alt="close" border="0" />');
			$("#openCloseIdentifier").show();
		} else {
			$("#slider").animate({ 
				marginLeft: "0px"
				}, 500 );
			$("#topMenuImage").html('<img src="/templates/template-winter/top-nav-slider-closed.png" alt="open" border="0" />');
			$("#openCloseIdentifier").hide();
		}
	});  

});


function get_url(url)
{
	window.location = url;	
}
function confirm_action(action,url)
{
	var ans = confirm(action);
	if(ans){ window.location = url; }
}
function open_popup(url,width,height)
{
	window.open (url,"mywindow","status=1,width="+width+",height="+height+""); 	
}

function itemFocus(field,val)
{
	var el = document.getElementById(field);
	if (el.value == val) {
		el.value = '';
	}
}

function itemFocusOut(field,val)
{
	var el = document.getElementById(field);
	if (el.value == '') {
		el.value = val;
	}
}



