$(document).ready(function(){
	$.fn.colorbox.settings.bgOpacity = "0.3";
	$.fn.colorbox.settings.contentCurrent = "{current} / {total}";	
	$.fn.colorbox.settings.contentPrevious = "";
	$.fn.colorbox.settings.contentNext = "";
	$("a[rel='gal']").colorbox({transition:"elastic"});
	$("a[rel='gal2']").colorbox({transition:"elastic"});

});

IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);
var newWin=null;

function PopUp(loc_ie, name, width, height) {
	if (window.NewWindow == null || window.NewWindow.closed)
	{
		var _params = "width="+width+",height="+height+",resizable=no,status=no,scrollbars=0";
		loc_ns = loc_ie;
		if (bVer >= 4) {
				 _left = ( (screen.width-width) >>1 );
				 _top = ( (screen.height-height) >>1 );
		} else {
				 _left = ( (800-width) >>1 );
				 _top = ( (600-height) >>1 );
		}
		if (IE) _params += ",top=" + _top + ",left=" + _left;
		else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;
		else _params += ",screenX=" + _left + ",screenY=" + _top;
		newWin = window.open(loc_ie, name, _params);
		newWin.document.open();
		newWin.document.write('<html><head><title>Пермь</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src='+loc_ie+' height="'+height+'" width="'+width+'" onClick="parent.self.close(); return false" style="cursor:pointer" title="Закрыть окно" alt="Пермь"></body></html>');
		newWin.document.close();
		if ( newWin!=null )
				newWin.focus();
	}
	else
	{
		window.NewWindow.location.href = loc_ie;			
		window.NewWindow.focus();
	}
}



var ShowReaktiveFlag = false;

function ShowReaktiveStart() {
	ShowReaktiveFlag = true;
	setTimeout("ShowReaktive()",50);
}

function ShowReaktive() {
	if ((ShowReaktiveFlag) && ($("#reaktive_block").css('display')=='none')){
		$("#reaktive_block").css({display: "block"});
		$("#reaktive_block IMG").css({width: 0, height: 0, left: "190px", top: "131px"});
		$("#reaktive_block IMG").animate({width: 274, height: 131, left:0, top:0}, 150);
	}
}

function HideReaktiveStart(){
	ShowReaktiveFlag = false;
	setTimeout("HideReaktive()",50);
}

function HideReaktive(){
	if ((!ShowReaktiveFlag) && ($("#reaktive_block").css('display')!='none')){
		if ($.browser.msie) $("#reaktive_block").css('display','none');
		else $("#reaktive_block").fadeOut(300);
	}
}




