// Cool tricks

jQuery(document).ready(function($) {
    //alert('sdfsdf');
});

jQuery(document).ready(function($) {
	$(".single > .post_content > p:first").addClass('p_large');
});

// Checks to see if form is filled on contact form
jQuery(document).ready(function($) {
	
	var $email = 'Email:';
	var $name = 'Name:';
	var $message = 'Message:';
	
	$('.wpcf7 :input').focus(function() {
			if ($(this).is('#your-email') || $(this).is('#your-name') || $(this).is('#your-message')) {
				if (this.value == $email) {
					this.value = '';
				}
				else if (this.value == $name) {
					this.value = '';
				}
				else if (this.value == $message) {
					this.value = '';
				}
			}
	});
	
    $('.wpcf7 :input').blur(function() {
			if ($(this).is('#your-email') || $(this).is('#your-name') || $(this).is('#your-message')) {
				if (this.value == '' && $(this).is('#your-email')) {
					this.value = $email;
				}
				else if (this.value == '' && $(this).is('#your-name')) {
					this.value = $name;
				}
				else if (this.value == '' && $(this).is('#your-message')) {
					this.value = $message;
				}
			}
	});
});

jQuery(document).ready(function($) {
	
	$('#newsletter_form').hide();
	
	$('.signup').click(function() {
		$('#newsletter > h4').hide();
		$('#newsletter > p').hide();
		$('#newsletter_form').show();
	});
	
	$('.signup_close').click(function() {
		$('#newsletter > h4').show();
		$('#newsletter > p').show();
		$('#newsletter_form').hide();
	});
	
	var $email = 'Email:';
	var $name = 'Name:';
	
	$('#newsletter_form :input').focus(function() {
			if ($(this).is('#nl_email') || $(this).is('#nl_name')) {
				if (this.value == $email) {
					this.value = '';
				}
				else if (this.value == $name) {
					this.value = '';
				}
			}
	});
	
    $('#newsletter_form :input').blur(function() {
			if ($(this).is('#nl_email') || $(this).is('#nl_name')) {
				if (this.value == '' && $(this).is('#nl_email')) {
					this.value = $email;
				}
				else if (this.value == '' && $(this).is('#nl_name')) {
					this.value = $name;
				}
			}
	});
	
});