var pro = {
	changeLink: function() {
		jQuery('ul#builderCategories').hide();
		jQuery('a#changeLink').click(function() {
			jQuery('.changeBtn a').toggleClass('selected');
			jQuery('ul#builderCategories').slideToggle(400);
			return false;
		});
	},
	
	setProCookie: function() {
		// If Pro User cookie isn't present, set it
		// Cookie should expire after 60 days
		if(jQuery.cookie('proUser') !== '1') {
			jQuery.cookie('proUser', 1, { expires: 60, path: '/' });
		} else {
			// If cookie is present, reset it to expire 60 days from now
			jQuery.cookie('proUser', 1, { expires: -1, path: '/' });
			jQuery.cookie('proUser', 1, { expires: 60, path: '/' });
		}
	},
	
	hoverSlide: function() {
		jQuery(".features-text").css({opacity: '.9'});
		jQuery(".marketing-content-pod").hover(
			function() {
				jQuery(this).find(".features-text").animate({height: '100px', opacity: '1' }, 200);
			},
			function() {
				jQuery(this).find(".features-text").animate({height: '24px', opacity: '.9'}, 200);
			}
		).click(function(){
				var link = jQuery(this).find('a').attr('href');
				if((link).match('^http')) {
					window.open(link);
				} else {
					window.location = jQuery(this).find('a').attr('href');
				}			
		});	
	},
	
	loginNotice: function() {
		var $av = jQuery('#accountVerify');
		if ($av.length != 0 && jQuery('#accountVerify p').length != 0) {
			$av.hide();
			jQuery('#avLink').click();
		}
	},
	
	// Add class of firstChild to selected elements to help IE6
	addFirstChild: function() { 
		jQuery('.fChild :first-child').addClass('firstChild');
	}
};

jQuery(document).ready(function(){
	pro.changeLink();
	pro.hoverSlide();
	pro.loginNotice();
	pro.addFirstChild();
});