$(document).ready(function() {

	$('#contact_btn')
		.click(function() {
			$('#contact_top').slideToggle("slow");
			return false;
		});
	$('#contact_close')
		.click(function() {
			$('#contact_top').slideUp('slow');
			return false;
		});
	$('#rss a')
		.append('<img src="/images/nge_rss_v2.0.png" alt="RSS Icon" '
			+ 'class="rss_icon" />');

	getTwitters('twitter-status', { 
		id: 'nategreen03', 
		count: 4, 
		enableLinks: true, 
		clearContents: true,
		template: '%text%'
	});

	$(".thumbbox").thumbBox({
		"previewWidth" : 50,
		"previewHeight" : 50,
		"fullWidth" : 524,
		"showCaption" : false
	});

  	$('a[rel="external"]').attr('target', '_blank');

  	if(document.location.hash=="#signedup")
  	{
  		$overlay = $('<div>')
			.addClass("thumbbox-overlay")
			.css({"opacity":"0"})
			.bind("click", function(){
					$(".thumbbox-overlay, .thumbbox-main")
						.fadeOut(300, function(){ $(this).remove(); });
				})
			.appendTo('body')
			.fadeTo(300, .5),
		$thumbbox = $('<div>')
			.addClass("thumbbox-main")
			.css({
				"top":$(window).scrollTop()+100+"px",
				"width":"400px",
				"height":"auto",
				"margin-left":"-200px"
			})
			.html('<div class="thumbbox-main-modal"><h1>Your Reports Are on the Way!</h1>'
					+'<p>You made a great choice. To show my appreciation, here\'s a '
					+'picture of a hot chick.</p><p><img '
					+'src="/images/nge_subscribed-hot-girl.jpg" alt="A Hot Chick" /></p>'
					+'<h2>Thank You - Please Confirm Your Email Address!</h2><p>Thank you '
					+'for your registering to receive your special report, <strong>"17 Tips '
					+'For Getting the Life You Want"!</strong></p><p>To maintain a high '
					+'quality mailing list, we need to verify that you are a REAL personal '
					+'with a REAL email address (and not a robot), so we\'ll need you to '
					+'confirm your email address by clicking on the link in the email we '
					+'just sent to the address you signed up with.</p><p>Once you confirm '
					+'your email address by clicking on the link in that email, you will '
					+'have immediate access to download your free stuff.</p><p>If you do '
					+'not see the email, please be sure to check your spam/junk folder as '
					+'the confirmation emails are sometimes mistakenly filtered as such.</p>'
					+'<p>Also, if you have any kind of spam blocking software or internet '
					+'service provider (ISP) filters, add nategreenfitness@getresponse.com '
					+'to your list of approved senders (also known as a "Whitelist" or '
					+'"safelist").</p><p>Because of spam problem these days, less and less '
					+'email actually reaches its intended destination due to over-aggressive '
					+'spam blocking measures. If you subscribed from a work email, you might '
					+'want to consider re-subscribing from your home or personal account, '
					+'since corporate email security is more likely to block our email '
					+'messages...which you don\'t want to miss.</p><p>For support, email '
					+'<a href="mailto:answers@ennuidesign.com">answers@'
					+'ennuidesign.com</a></p><a href="#">CLOSE</a></div>')
			.bind("click", function(){
					$(".thumbbox-overlay, .thumbbox-main")
						.fadeOut(300, function(){ $(this).remove(); });
					return false;
				})
			.appendTo("body");
  	}

});

var formId = "contact";
var reqFields2 = new Array('cf_m','cf_n','cf_e');
if ( document.getElementById(formId) ) {
  prettyForms(formId, reqFields2);
}