
/* ! - revision date 10-06-10 - */
	
	$(document).ready(function(){
		
		
		// ! main_nav
		$('ul#main_nav').superfish();
		
		
		// ! emaillist show/hide
		$('#emailus p').hide();
		$('#emaillist').hide();
		
		$('#email_icon a').mouseenter(function() {
				$('#emailus p').fadeIn('slow');
			});
		
		var visible = false;
		$('#email_icon a').click(function(){
			
			$('#emailus p').hide();
			
			if (visible) {
				$('#emaillist').hide();
				$('#emailus').animate({ width: '96px' }, 'slow');
				$('#emailus p').text('Email Us');
				$('#emailus p').css('left', '0');
				visible = false;
			} else {
				$('#emailus').animate({ width: '235px' }, 'slow', 
					function(){
						$('#emaillist').fadeIn('slow');
					});
				$('#emailus p').text('Close');
				$('#emailus p').css('left', '20px');
				visible = true;
			}
			
			return false;
			
		});
		
		
		// ! flash
		$('#flash_header').each(function(){
			if( $(this).flash({
	    	// src: 'http://inventus.theoleswitcharoo.com/wp-content/themes/Inventus_3.0/_swf/Inventus_site_header_v8.swf',
	    	src: 'http://www.inventus.com/wp-content/uploads/2010/10/Inventus_site_header_v9.swf',
	    	width: 900,
	    	height: 155,
	    	wmode: 'transparent'
			}) ) {
				// if true, no problem
			} else {
				$('#header .hidden').show();
			}
		});
		
		
		// ! footer site map
		$('#site_map ul li ul').hide();
		$('#site_map ul li span a').each(function(e){
			$(this).click(function(){
				
				if ($(this).hasClass('minus')) {
					$(this).removeClass('minus');
					$(this).parent().next().animate({
                height: 'toggle',
                opacity: 'toggle'
              }, 1000); 
				}
				
				else {
				
					$('a.minus').parent().next().slideToggle();
					$('a.minus').removeClass('minus');
					
					$(this).parent().next().animate({
								height: 'toggle',
                opacity: 'toggle'
              }, 1000); 
              
					$(this).addClass('minus');
				
				}
				
				return false;
				
			});
		});
		
		
		// ! email list
		$('#emaillist a').each(function(){
			$(this).click(function(){
				preventDefault();
			});
		});
		
	});
