// JavaScript Document
//łśćłżź
var DebugQueryMode=false; //Show Alerts
//var IE=false;

try{
	function alert(text_value){ 
		try{ text_value=text_value.replace(/\n/g,'<br />'); }catch(errs){}
		$JQ('#system_alert p .system_alert_text').html(text_value);
		$JQ('#system_alert').dialog('open');
	}	
}catch(err){ if(DebugQueryMode==true){ /*alert('alert: '+err);*/ }}

/* ================================================================================== */
/* =============================== jquery.ready [START] ============================= */
/* ================================================================================== */
//try{
//$JQ(document).ready(function(){

/* =============================== #system_alert [START] ============================ */
try{							 
 	$JQ('#system_alert').dialog({
		autoOpen: false,
		bgiframe: true,
		resizable: false,
		closeOnEscape: true,
		//show: 'slide',
		//hide: 'slide',
		//height:140,
		width:300,
		//height:200,
		modal: true,
		overlay: {
			backgroundColor: '#000000',
			opacity: 0.9
		},
		buttons: {
			Ok: function() {
				$JQ(this).dialog('close');
			}
		}
		
	});
}catch(err){ if(DebugQueryMode==true){ alert('#system_alert: '+err); }}
/* =============================== #system_alert [END] ============================== */



//});

//}catch(err){ if(DebugQueryMode==true){/* alert('$JQ.ready '+err);*/ }}
/* ================================================================================== */
/* =============================== jquery.ready [END] =============================== */
/* ================================================================================== */

/*
$JQ(document).ready(function() {
 		$JQ("#announcements_options").dialog({
		autoOpen: false,
		bgiframe: true,
		resizable: false,
		closeOnEscape: true,
		//show: 'slide',
		//hide: 'slide',
		//height:140,
		width:456,
		//height:200,
		modal: true,
		overlay: {
			backgroundColor: '#000000',
			opacity: 0.9
		},
		buttons: {
			'Actual news': function() {
				window.location= '/news/news.html';
			},
			'Archive news': function() {
				window.location= '/news/news.html';
			},
			'Employees news': function() {
				window.location= '/database/news.html';
			},
			'Cancel': function() {
				$JQ(this).dialog('close');
			}
		}
		
	});
	
});


$JQ(document).ready(function() {
	$JQ(".faqs").accordion({
           autoHeight: false,
           collapsible: true,
	       active: false
	});
});
*/

/* ================================================================================== */
/* ===============================    Fuel  Design    =============================== */
/* ================================================================================== */
$JQ(function()
{
	
	if ( $JQ( "#flash_home" ).length )
	{
		var fadeClassNew = "item";
		var fadeClassOld = "";
		
		// show the first item
		$JQ( "#flash_home .descriptions .menu_nav_1" ).fadeIn();
		
		$JQ( "#flash_home .menu .item" ).mouseenter( function()
		{
			fadeClassOld = fadeClassNew;
			fadeClassNew = $JQ(this).attr("id");
			if ( fadeClassOld != fadeClassNew )
			{
				$JQ( "#flash_home .descriptions .item" ).hide();
				$JQ( "#flash_home .descriptions ."+fadeClassNew ).stop(true,true).fadeIn("fast");
			}
		});
	}
});
