function autoClear()
{
  jQuery('input#txtquestion').addClass('autoclear');
  
  jQuery('input.autoclear').each(function()
  {
    jQuery(this).attr('default',jQuery(this).val());
    
    jQuery(this).focus(function()
    {
      if (jQuery(this).val()==jQuery(this).attr('default'))
      {
        jQuery(this).val('');
      }
    });
    
    jQuery(this).blur(function()
    {
      if (jQuery(this).val() == '')
      {
        jQuery(this).val(jQuery(this).attr('default'));
      }
    });
  });
}

jQuery(document).ready(function(){
  
  autoClear();
  
  // Who we work with...
  if ( jQuery('div#who-we-work-with').length )
  {
    setInterval( 'slideSwitch()',2750 );
  }
  
  jQuery('li#defineStrategy,li#driveTraffic,li#deliverSales').click(function(){
    document.location.href=jQuery(this).find('a').attr('href');
  });
  
	// Front logos
	if (jQuery(".frontClient")[0]) {
		for (i=3; i<=jQuery('.frontClient').length;i+=3){
			jQuery('.frontClient').slice(i-1,i).css({"margin-right":"0"});
		}
	}
	
	// Social bookmarking
	if (jQuery("ul.socialBookmark")[0]) {
		for (i=5; i<=jQuery('ul.socialBookmark li').length;i+=5){
			jQuery('ul.socialBookmark li').slice(i-1,i).css({"padding-right":"0"});
		}
	}
	
	// front page equalheight
	//if (jQuery("#front-postings, #front-information, #front-about")[0]) {
		//jQuery("#front-postings, #front-information, #front-about").equalHeight();
	//}
	
	// sub page equalheight
/*
	if (jQuery("#content, #leftbar, #rightbar")[0]) {
		jQuery("#content, #leftbar, #rightbar").equalHeight();
	}
*/
	
	// recent news last item
	if (jQuery(".recent-news li")[0]) {
		jQuery(".recent-news li:last").css({"border-bottom":"none"});
	}
	
	// input:text hints
	if (jQuery("input:text")[0]) {
		jQuery('input:text').hint();
	}
	
	// Fade
	if (jQuery("#fadeimages")[0]) {
		jQuery('#fadeimages').innerfade({ 
            speed: 1000, 
            timeout: 5000, 
            type: 'sequence', 
            containerheight: '220px' });
	}
	// lightbox
	if (jQuery("a[@rel*=lightbox]")[0]) {
    	jQuery('a[@rel*=lightbox]').lightBox();
	}
});

function RefPage() 
{ 
var srcPage = document.URL;
return srcPage; 
} 
