$(document).ready(function(){
    $(document).pngFix();

//    $(".switch a").click(function () {
//      $(this).toggleClass("off");
//    });

    $(".switch a").click(function () {
        $(this).toggleClass("off");
        $('#lighston').toggleClass("hheader_wrapper");
    } );

    $('#slideshow').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 30000,
        pager:  '#slider_nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider_nav li:eq(' + (idx) + ') a';
        }
    });


});


$(function () {
    $('.fade').hover(function() {
	$(this).fadeTo("fast", 0.5);
	}, function() {
	$(this).fadeTo("fast", 1);
    });
});

function redraw(field_id)
{
	document.getElementById(field_id).innerHTML = document.getElementById(field_id).innerHTML;
}


function display(id)
{
	var Browser = navigator.appName;
	if(Browser=="Opera" || Browser=="Microsoft Internet Explorer")
	{
		var DivVisibility = document.getElementById(id).currentStyle.visibility;
		if(DivVisibility=="visible")
		{
			document.getElementById(id).style.visibility = 'hidden'; 
			document.getElementById(id).style.height = "0";
		}
		else
		{
			document.getElementById(id).style.visibility = 'visible'; 
			document.getElementById(id).style.height = "auto";
		}
	}
	else
	{
		var DivHeight = document.getElementById(id).clientHeight;
		if(DivHeight>0)
		{
			document.getElementById(id).style.visibility = 'hidden'; 
			document.getElementById(id).style.height = "0";
		}
		else
		{
			document.getElementById(id).style.visibility = 'visible'; 
			document.getElementById(id).style.height = "auto";
		}
	}
	
}
