$j(document).ready(function(){ 
   $j(".rounded").corner();
   
   
   //menu1 rollover
   $j("#menuTop").find("li").hover(
        function () {
        	//alert($j(this).children(':first').css('background').replace("1.jpg", "2.jpg") );
        	$j(this).children(':first').css('background',$j(this).children(':first').css('background').replace("1.jpg", "2.jpg"));
            //this.src = this.src.replace("1.jpg", "2.jpg");
            
            if($j(this).children(':first').attr("id") == "firstMenu") {
                $j("#topLeftMenu").each(function () {
                    this.src = this.src.replace("1.jpg", "2.jpg");
                });
            } else if($j(this).children(':first').attr("id") == "lastMenu") {
                $j("#topRightMenu").each(function () {
                    this.src = this.src.replace("1.jpg", "2.jpg");
                });
            }
        },
        
        function () {
            $j(this).children(':first').css('background',$j(this).children(':first').css('background').replace("2.jpg", "1.jpg"));
            
            if($j(this).children(':first').attr("id") == "firstMenu") {
                $j("#topLeftMenu").each(function () {
                    this.src = this.src.replace("2.jpg", "1.jpg");
                });
            } else if($j(this).children(':first').attr("id") == "lastMenu") {
                $j("#topRightMenu").each(function () {
                    this.src = this.src.replace("2.jpg", "1.jpg");
                });
            }
        }
   );
   
   //menu2 rollover
   $j("#menuBottom").find("a > img").hover(
        function () {
            this.src = this.src.replace("1.jpg", "2.jpg");
            
            if($j(this).attr("id") == "firstBottomMenu") {
                $j("#bottomLeftMenu").each(function () {
                    this.src = this.src.replace("1.jpg", "2.jpg");
                });
            } else if($j(this).attr("id") == "lastBottomMenu") {
                $j("#bottomRightMenu").each(function () {
                    this.src = this.src.replace("1.jpg", "2.jpg");
                });
            }
        },
        
        function () {
            this.src = this.src.replace("2.jpg", "1.jpg");
            
            if($j(this).attr("id") == "firstBottomMenu") {
                $j("#bottomLeftMenu").each(function () {
                    this.src = this.src.replace("2.jpg", "1.jpg");
                });
            } else if($j(this).attr("id") == "lastBottomMenu") {
                $j("#bottomRightMenu").each(function () {
                    this.src = this.src.replace("2.jpg", "1.jpg");
                });
            }
        }
   );
   
   // menu1 div click
    $j("#menuTop").find("div").click(
    function() {
        window.location = $j(this).find("a").attr("href");
    });
   
   
   
   //rounded corner divs
  
//   $j(".wrappedContent").wrap('<div class="roundedContainer"><div style="background:url(' + webroot + 'img/content/Bkg-content-sus.jpg) top left no-repeat;"><div style="background:url(' + webroot + 'img/content/Bkg-content-jos.jpg) bottom left no-repeat; padding-bottom:10px;"></div></div></div>');
  
   
});



//$j(window).load(function () {
//    //remove live support link-text
//   $j("#scnrZg , #sdnrZg").find("a").each(function() {
//       if($j(this).attr("href") == "#") {
//            var content = $j(this).parent("td").html();
//       
//            $j("#liveSupportSmall").html(content);
//       }
//   });
//});
