$(document).ready(function(){ 
	$("ul.sf-menu").supersubs({ 
    	minWidth:    2,   // minimum width of sub-menus in em units 
        maxWidth:    50   // maximum width of sub-menus in em units 
        }).superfish({
		dropShadows:false,
		autoArrows: false
		}).find('ul').bgIframe({opacity:false});
		
		//tabbed retail products page
//		$("#tabs").tabs(); //Tabs UI
		var tabContainers = $('div#tabs >div.product');
//		tabContainers.hide().filter(':first').show();
		
		$('div#tabs ul#tabmenu a').click(function() {
			tabContainers.hide().filter(this.hash).show();
			$('div#tabs ul#tabmenu a').removeClass('selected');
			$(this).addClass('selected');
			
	        return false;
	    }).filter(':first').click();
		
		//accordian def list for retail products
		$("dd").hide();
		$("dt a").click(function(){
			$(this).parent().next().slideToggle("slow");
			$(this).toggleClass('open');
			return false;
		});

}); 

//google maps
function initialize() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map_canvas"));
		map.setCenter(new GLatLng(33.68827275131083, -117.83388376235962), 13);
		var customUI = map.getDefaultUI();
		customUI.controls.scalecontrol = false;
		customUI.maptypes.physical = false;

		customUI.controls.largemapcontrol3d = false; //gets rid of clutering scale controls
		customUI.controls.smallzoomcontrol3d = true; //puts small scale controls
		map.setUI(customUI);
		map.openInfoWindowHtml(map.getCenter(),
                   '<span>Cosmedi Irvine</span> <br />2700 Alton Parkway #233<br />Irvine, CA 92606<br /><a href=\"http://maps.google.com/?q=%23%202700%20Alton%20Parkway%20%23233%0A%23%20Irvine%2C%20CA%2092606\" target=\"_new\">Get Directions</a> <small>(opens in new window)</small>');
	}
}

/*var intro = new SWFObject("flash/cosmedianimation.swf", "Cosmedi Flash", "577", "325", "9","#ffffff");
intro.addParam("wmode", "opaque");
intro.write("flashIntro");
*/
