$(document).ready(function(){
        $('.gallery a').lightBox();
		$("#node-2-hidder").click(function(){
			var node = $("#node-2"); 
			if(node.attr("show")==1){
				node.animate({"height":"0px"},400).attr("show",0);
				$(this).removeClass("arrs-up").addClass("arrs-down");
			}else{
				node.animate({"height":"510"},400).attr("show",1);
				$(this).removeClass("arrs-down").addClass("arrs-up");				
			}
		})
});
function ShowMessage(messageText,sButtons){ 
	if(messageText!=''){
		messageText = messageText.split("\|");
		var title = "";	
				
		$("#messageWindow").dialog('close').dialog('destroy');		
		$("#messageWindow #messageText").html(messageText[0]);
		$("#messageWindow").attr("title",title);
	
		if(sButtons==undefined){ 
			sButtons = {"Закрыть": function(){$(this).dialog('destroy');}};
		}else{
			$.each(sButtons,function(a,n){ 
				if(n=="" || n==null){				
					sButtons[a] = function(){$(this).dialog('destroy');};
				}
			});
		}
		$("#messageWindow").dialog({
			bgiframe: true,
			resizable: false,			
			height:250,
			width:350,
			modal: true,
			overlay: {
				backgroundColor: '#000',
				opacity: 0.5
			},
			buttons: sButtons			
		});
	}
	return false;
}
