$(document).ready(function(){ 
  $("ul.sf-menu").superfish({
    autoArrows:  false,
    dropShadows: false
  });

  $('A[rel="external"]').click(function() {
    window.open($(this).attr('href'));
    return false;
  });

	$('#shTopImg').live("contextmenu",function(e){

		$(this).contextMenu({
			menu: 'myMenu'
		},
			function(action, el, pos) {
			window.location('/contact/');
		});

		return false;

	});

	$('.ngg-gallery-thumbnail img').contextMenu({
		menu: 'myMenu'
	},
		function(action, el, pos) {
			window.location('/contact/');
	});



  // pretty content header tags
	$('#content h2').sifr({
		path:'/wp-content/themes/eurus/images/',
		font:'univers'
	});
	$('#content h3').sifr({
		path:'/wp-content/themes/eurus/images/',
		font:'univers'
	});
	$('#content h4').sifr({
		path:'/wp-content/themes/eurus/images/',
		font:'univers'
	});	

  // top level animations
  $("#nav li a strong").hover(function(){	
  	
//  	if ($(this).hasClass('child')) alert('CHILD!'); 

	$(this).addClass('cursorFix');
	
  	  $(this).animate({
  	    backgroundColor: '#ffffff',
  	    color: '#71c8d1'
  	  },
  	  800);	  
 	},function(){

	$(this).removeClass('cursorFix');

  	  $(this).animate({
  	    backgroundColor: '#7ac142',
  	    color: '#ffffff'
  	  },
  	  800);
 	});
 	
  // top level animations
  $("#nav li a span").hover(function(){	
	
  	  $(this).animate({
  	    backgroundColor: '#eeeeee',
  	    color: '#7ac142'
  	  },
  	  800);	  
 	},function(){
  	  $(this).animate({
  	    backgroundColor: '#ffffff',
  	    color: '#71c8d1'
  	  },
  	  800);
 	});  	
 
   // second level animations
  $("#nav li.child a").hover(function(){	
  	  $(this).animate({
  	    backgroundColor: '#8d8c8c',
  	    color: '#ffffff'
  	  },
  	  800);	  
 	},function(){
  	  $(this).animate({
  	    backgroundColor: '#7ac142',
  	    color: '#ffffff'
  	  },
  	  800);
 	}); 
 
 // flash stuff!!
 $('#logo').empty().flash({
    src: '/wp-content/themes/eurus/images/logo.swf',
    width: 335,
    height: 41
 });
 
 $('#wind div.flash').empty().flash({
    src: '/wp-content/themes/eurus/images/wind.swf',
    width: 235,
    height: 396,
    wmode: 'transparent'
 });
 $('#solar div.flash').empty().flash({
    src: '/wp-content/themes/eurus/images/solar.swf',
    width: 235,
    height: 396,
    wmode: 'transparent'
 });  
 $('#projects div.flash').empty().flash({
    src: '/wp-content/themes/eurus/images/projects.swf',
    width: 235,
    height: 396,
    wmode: 'transparent'
 }); 

 $('#wind .learnmore').empty().flash({
    src: '/wp-content/themes/eurus/images/learnmore_wind.swf',
    width: 104,
    height: 20
 });
  $('#solar .learnmore').empty().flash({
    src: '/wp-content/themes/eurus/images/learnmore_solar.swf',
    width: 104,
    height: 20
 });

}); 

