$(document).ready(function() {	
	
	$('.alteringRows .row:even').addClass('odd');
	
	$('li.mainMenuLi').hoverIntent(
		function() { $('.submenu', this).slideDown('fast'); },					   
		function() { $('.submenu', this).slideUp('fast'); }
	).css('zindex','9999');
	
	$('.showReason').hoverIntent(
		function() { $('.reason', this).slideDown('fast'); },					   
		function() { $('.reason', this).slideUp('fast'); }
	).css('zindex','9999');

	$('.showReasonError').hoverIntent(
		function() { $('.reason', this).slideDown('fast'); },					   
		function() { $('.reason', this).slideUp('fast'); }
	).css('zindex','9999');

	$('li.mainMenuLi').hover(
		function() { $(this).addClass('hover'); },					   
		function() { $(this).removeClass('hover'); }					   
	).css('zindex','9999');


	$('.reason .general').click(function(){
		if (document.getElementById("showReason").className == "showReasonError") {
			$('#showReason').toggleClass('showReason');
		}
		$('#reason').html('General Inquiry');
		$('#Contact_Reason').val('General Inquiry');
		$('.reason').slideUp('fast');
	});

	$('.reason .business').click(function(){
		if (document.getElementById("showReason").className == "showReasonError") {
			$('#showReason').toggleClass('showReason');
		}
		$('#reason').html('Business Inquiry');
		$('#Contact_Reason').val('Business Inquiry');
		$('.reason').slideUp('fast');
	});

	$('.reason .residential').click(function(){
		if (document.getElementById("showReason").className == "showReasonError") {
			$('#showReason').toggleClass('showReason');
		}
		$('#reason').html('Residential Inquiry');
		$('#Contact_Reason').val('Residential Inquiry');
		$('.reason').slideUp('fast');
	});

	$('.reason .support').click(function(){
		if (document.getElementById("showReason").className == "showReasonError") {
			$('#showReason').toggleClass('showReason');
		}
		$('#reason').html('Support Inquiry');
		$('#Contact_Reason').val('Support Inquiry');
		$('.reason').slideUp('fast');
	});
	
	$('.popup').fancybox({
		swf: { 
				play: 'true',
				quality: 'best'
			 }
	});
	
	$('.forms').fancybox({
		'width'			: 500,
		'scrolling'		: 'yes',
		'titleShow'		: true,
		'iframe'		: true,
		'onClosed'		: function() {
	    	$("#error").hide();
		}
	});

	$('.gallery').fancybox();
	
	$('img, #topSection #logo a, #menuSection #mainNav ul li .submenu .submenutop, #menuSection #mainNav ul li .submenu .submenubtm, #quickconnect, #twitter, #bottomSection h3 a, #footerSection .hrslogo a').supersleight({shim: '/images/common/clear.gif'});	
	
	if($.browser.msie){
    	$('.box, .formhead2, .formbox').corner('5px');
   	}
   
	
});

getTwitters('tweets', { 
  id: 'xecunet', 
  count: 1, 
  enableLinks: true, 
  ignoreReplies: false, 
  clearContents: true,
  template: '<p class="tweets">%text%</p><p class="links"><a target="_blank" href="http://twitter.com/%user_screen_name%/statuses/%id%/">%time%</a> &nbsp;&bull;&nbsp; <a target="_blank" href="http://twitter.com/?status=@%user_screen_name%&in_reply_to_status_id=%id%&in_reply_to=%user_screen_name%">Reply</a></p>'
});


