$(document).ready(function() {
  $('#nav').superfish({
	autoArrows: false,
	dropShadows: false
  });
  if($('#testImg')[0].offsetWidth == 108) {
	$('#features h2 a').each(function() {
	  string = $(this).text();
	  filename = string.toLowerCase().replace(/ /g, '-').replace(/([^0-9a-z-])/g,'');
	  $(this).html('<img src="/images/headers/home/' + filename + '.gif" alt="' + string + '" />');
	});
  }
  $('.smFeature, .lgFeature').hoverIntent(
	  function() {
	    $(this).siblings().stop().fadeTo(350,.3);
	  },
	  function() {
		$(this).siblings().stop().fadeTo(350,1);
	  }).click(function(){
	window.location=$(this).find("a").attr("href"); return false;
  });
  $('#txtEmail').Watermark('Enter your email','#3a2702');
  var date = $('#copyright').text();
  var year = new Date().getFullYear();
  if (year > date) {
	$('#copyright').text(year);
  }
  //$("#video a[rel]").overlay({effect: 'apple',expose: '#232e44',top: 'center'});
  /*var api = $('#watchVideo').overlay({api:true,expose: '#232e44',top:'center'});
  api.onLoad(function() {
	flowplayer('player','/video/flowplayer-3.1.5.swf', { 
	  clip: { 
		   
		  // these two configuration variables does the trick 
		  autoPlay: false,  
		  autoBuffering: true
	  } 
    });				  
  });
  $('#video').click(function() {
	api.load();
	return false;
  });*/
  $('#webinars').hover(function() {
	$(this).expose({api: true}).load(); 						
  }, function() {
	$(this).expose({api: true}).close();  
  })
})