$(function(){
	// Accordion
	$("#accordion").accordion({ header: "h3" });

	// Tabs
	$('#tabs').tabs();
	// Dialog			
	$('#dialog').dialog({
		autoOpen: false,
		width: 600,
		buttons: {
			"Ok": function() { 
				$(this).dialog("close"); 
			}, 
			"Cancel": function() { 
				$(this).dialog("close"); 
			} 
		}
	});
	
	// Dialog Link
	$('#dialog_link').click(function(){
		$('#dialog').dialog('open');
		return false;
	});
	
	//hover states on the static widgets
	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);			
});

$(function() {
  $("#dialog").dialog({
   bgiframe: true,
   height: 140,
   modal: true
  });
  
/*
var selectedTab = $("#nav_welcome");
$("#navdropdown li").click(function(){ 
     //alert($(this).next('ul'));
     selectedTab.removeClass('current');
     $(this).('ul>li a').show(); //addClass('current'); //toggle();//('showme'); //Show the subnav
     selectedTab = $(this);
   });
*/
    
    
    
    
});
$(document).ready(function() {
/*
$("ul#menunav li").hover(function() { //Hover over event on list item
	if (notpullup){
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	}
} , function() { //on hover out...
	if(notpullup){
	    $(this).css({ 'background' : 'none'}); //Ditch the background
	    $(this).find("span").hide(); //Hide the subnav
	}
});
*/
    
  $("#home").click(function() { //click over event on list item
	    $('#menunav li').css({ 'background' : 'none'}); //Ditch the background
	    $('#menunav li').find("span").hide(); //Hide the subnav
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	    //return false;
    });	
 
    
  $("#maps").click(function() { //click over event on list item
	    $('#menunav li').css({ 'background' : 'none'}); //Ditch the background
	    $('#menunav li').find("span").hide(); //Hide the subnav
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	    //return false;   
    });	
  
  $("#market").click(function() { //click over event on list item
	    $('#menunav li').css({ 'background' : 'none'}); //Ditch the background
	    $('#menunav li').find("span").hide(); //Hide the subnav
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	    //return false;
    });	

   
  $("#forum").click(function() { //click over event on list item
	    $('#menunav li').css({ 'background' : 'none'}); //Ditch the background
	    $('#menunav li').find("span").hide(); //Hide the subnav
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	    //return false;
    });	
 
    
  $("#mystuff").click(function() { //click over event on list item
	    $('#menunav li').css({ 'background' : 'none'}); //Ditch the background
	    $('#menunav li').find("span").hide(); //Hide the subnav
	    $(this).css({ 'background' : '#3cc925 url(/myMedia/pix/topnav_active.gif) repeat-x'}); //#1376c9 Add background color + image on hovered list item
	    $(this).find("span").show(); //Show the subnav
	    //return false;   
    });	
 
    
});

