function blockError(){return true;}
window.onerror = blockError;
$(document).ready(function(){
   if ($.browser.msie && $.browser.version <= 7) {
      $('.topnav li:first-child a').css('border','0px');
      $('.page-static-leftcol table tr *:first-child').css('border-left','0px');
      $('.page-actions-leftcol .g_corners:first-child').css('margin-top','0px');
   }	
	 $('.page-clients-list-image-quote').hover(function(){
		 $(this).parent('li').find('.page-clients-popup').animate({
			 opacity: 'show'
			 }, 350);
	 },
	 function(){
		 $(this).parent('li').find('.page-clients-popup').animate({
			 opacity: 'hide'
			 }, 350);
	 });
	 $('.header-cabinet-link a').click(function(){
		 if($('.header-popup').is(':hidden')) {
			 $('.header-popup').animate({opacity: 'show'}, 350);
		 }
		 else {
			 $('.header-popup').animate({opacity: 'hide'}, 350);
		 };
	 });
	 
    var timeout    = 200;
		var closetimer = 0;
		var ddmenuitem = 0;
		
		function jsddm_open()
		{  jsddm_canceltimer();
			 jsddm_close();
			 ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
		
		function jsddm_close()
		{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
		
		function jsddm_timer()
		{  closetimer = window.setTimeout(jsddm_close, timeout);}
		
		function jsddm_canceltimer()
		{ 
		 if(closetimer)
			 {  window.clearTimeout(closetimer);
					closetimer = null;}}
		
		$(document).ready(function()
		{  $('.topnav > li').bind('mouseover', jsddm_open)
			 $('.topnav > li').bind('mouseout',  jsddm_timer)});
		
		document.onclick = jsddm_close;
});
