$(document).ready(function() {
if (window.navigator.userAgent.indexOf ("Opera") >= 0)
  {
   ua = 'Opera';
  }

if (window.navigator.userAgent.indexOf ("MSIE") >= 0)
  {
   ua = 'Explorer';
  }
  if (window.navigator.userAgent.indexOf ("Gecko") >= 0)
  {
   ua = 'Netscape';
  }

  switch(ua) {
    case 'Explorer':

    break
    case 'Opera':
      $("#leftmenu").css("top", "330px");
      $("div.right-bg").css("marginTop", "-12px");
      $("div#horizontal-menu ul").css("marginLeft", "-20px");
      $("div#horizontal-menu ul li img").css({
        paddingRight: "3px",
        paddingLeft: "3px"
        });
    break
    case 'Netscape':
      $("#leftmenu").css("top", "330px");
      $("div#horizontal-menu").css({
        marginTop: "-12px",
        marginLeft: "-15px",
        width: "102%",
        marginRight: "10px"
        });
     $("div.right-bg").css("marginTop", "0");
    break
    default:
      $("div.homes").css("marginBottom", "10px");
      $("div.contacts").css("marginBottom", "20px");
      $("div#horizontal-menu").css({
        marginTop: "10px",
        marginLeft: "-5px"
     });
    break;
  }

       $("div.submenu").each(function() {
      $(this).children("ul.sub").slideUp("slow");
    $(this).children("span").mouseover(function() {
       if ($(this).attr("class") == 'hide'){
         $(this).nextAll("ul.sub").slideDown("slow");
         $(this).attr("class", "show");
         return false;
       }
       if ($(this).attr("class") == 'show'){
         $(this).nextAll("ul.sub").slideUp("slow");
         $(this).attr("class", "hide");
         return false;
       }
     });
    });

  $("div.banners").css("display", "none");


  var url = window.location.href;
  var get = url.substring(url.lastIndexOf('/') + 1);
  if (get != '' && get != 'index.html'){
	$("div.banners").css("display", "block");
	$("div#myImageFlow, div.allimg").css("display", "none");
	   } else {
		   $("div.banners").css("display", "none");
		   $("div#myImageFlow, div.allimg").css("display", "block");
		   }
   if (get == ''){
	   var url2 = window.location.href;
	   var get2 = url2.indexOf('documents', 0);
	    if (get2 > 0)
	    $("div#myImageFlow, div.allimg").css("display", "none");
	   }
 });

