function show_div(id)
{
	var div;
	div = document.getElementById(id);
	if ( div.style.display == "none" ) div.style.display = "block";
		else div.style.display = "none";
}


function IEPngFix(pngimg, gifimg, width, height, repeat, scale)
{
	var code = '<img src="'+ gifimg +'" width="' + width + '" height="' + height + '" border="0" style="background:url('+pngimg+') '+repeat+' 0px 0px;"/>';
	if( navigator.userAgent.indexOf("Opera") > 1 ) document.write(code);
	else
		if( navigator.userAgent.indexOf("MSIE 6") > 1 ) document.write('<img src="'+gifimg+'" width="' + width + '" height="' + height + '" border="0" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src=' + pngimg + ' , sizingMethod='+scale+' );"/>');
		else
			if(navigator.userAgent.indexOf("MSIE 5") != -1) document.write(code);
			else document.write(code);
}





$(document).ready(function(){
	$('body').pngFix( );
	$(".fancypopup a").fancybox();
	$(".awa").fancybox();
	$(".gallery-image a").lightbox();

	$('.c_col a').each(function(){
		link = $(this).attr('href');
		if( ($(this).attr("target")) && (link.indexOf('.jpg') > 0) ) $(this).fancybox();
	});

	$('.start_c_col a').each(function(){
		link = $(this).attr('href');
		if( ($(this).attr("target")) && (link.indexOf('.jpg') > 0) ) $(this).fancybox();
	});


	$('body').pngFix( );

	$('#ico_mail').hover(
		function(){ $(this).attr('src', '/i/ico_mail1.gif'); },
		function(){ $(this).attr('src', '/i/ico_mail.gif'); }
	);
	$('#ico_home').hover(
		function(){ $(this).attr('src', '/i/ico_home1.gif'); },
		function(){ $(this).attr('src', '/i/ico_home.gif'); }
	);
	$('#ico_map').hover(
		function(){ $(this).attr('src', '/i/ico_map1.gif'); },
		function(){ $(this).attr('src', '/i/ico_map.gif'); }
	);
	

});


function gotolink(link, param_id){
	if(param_id)
	{
		$param_select = $('#'+param_id);
		param = '?'+param_id+'='+$param_select.val();
	} else param = '';

	document.location=link+param;
}

