$(document).ready(function(){
              jQuery("<img>").attr("src",'subOrange.jpg');
														$('.topmenu').each(function(){
																												var w=$(this).width();
																												w=w+20;
																												//arguments.callee.ww+=w;
																												//var offl=$(this).offset().left;
																												//$(this).parent('li').css({'position':'absolute','left':w,'width':w});
																												$(this).width(w);
																												$(this).wrap("<div></div>");
																												$(this).parent().width(w).css({'text-align':'center','vertical-align':'top','line-height':'20px','margin-top':'12px'});
														})
														$('.topmenu').FontEffect({shadow:true,shadowBlur:1,shadowOffsetTop:1,shadowOffsetLeft:1,shadowOpacity:.1,shadowColor:'#1c233f'});
              $("#nav-one li").imageover();
              $(".moduleBar").moduleOver();
$(".moduleHead").FontEffect({shadow:true,shadowBlur:1,shadowOffsetTop:2,shadowOffsetLeft:2,shadowOpacity:.3,shadowColor:'#1c233f'})
              $("#nav-one li").hover(
                      function(){ $("submenu",this).show(); },
                      function() { $("submenu",this).hide();}
              );

 });


$.fn.imageover=function(c){
              return this.each(function(){
               $(this).hover(
                            function(){
                                          $(this).find(".submenu").show();
                                          $(this).find(".submenu").find(".submenuLink").FontEffect({shadow:true,shadowBlur:1,shadowOffsetTop:2,shadowOffsetLeft:1,shadowOpacity:.1,shadowColor:'#1c233f'});
                            },
                            function(){
                                          $(this).find(".submenu").hide();
                            });
              });
};

$.fn.moduleOver=function(c){
              return this.each(function(){
               $(this).hover(
                            function(){$(this).find(".moduleHead:first").css('color','#E6782E');},
                            function(){$(this).find(".moduleHead:first").css('color','#fff');}
                            );
               $(this).click(function(){
                            var spot=$(this).parent();
                            spot.find(".expandSliver").animate({height:'toggle'},'fast',function(){spot.toggleClass('collapse');});
						var spotoffset=spot.offset().top;
						$('html,body').animate({scrollTop:spotoffset},'slow');
                            });
              });
};
