jQuery(document).ready(function($) {


//Clear Input onClick - Andy
jQuery.fn.cleardefault = function() {
	return this.focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
};
jQuery(".join-mail-list input").cleardefault();

$('li.blank a').attr('target','_blank');

// jQuery(".fa-1").mouseover(function() {
//     jQuery('.fa-1 .article-container').removeClass('hidden');
    
//   }).mouseout(function(){
//     jQuery('.fa-1 .article-container').addClass('hidden');

//   });
  
// jQuery(".fa-2").mouseover(function() {
//     jQuery('.fa-2 .article-container').removeClass('hidden');
//   }).mouseout(function(){
//     jQuery('.fa-2 .article-container').addClass('hidden');
//   });
  
// jQuery(".fa-3").mouseover(function() {
//     jQuery('.fa-3 .article-container').removeClass('hidden');
//   }).mouseout(function(){
//     jQuery('.fa-3 .article-container').addClass('hidden');
//   });

/*--- Lightboxes ---*/
jQuery('a[target="_overlay"]').fancybox();


/*--- GALLERIES ---*/
if( jQuery( 'body' ).hasClass( 'term-dancers' ) ){
	jQuery( ".gallery-layout" ).delegate( "article", "click", function(){
		jQuery( 'a', this ).first().triggerHandler( 'click' );
	});
} else {
	jQuery( ".gallery-layout" ).delegate( "article", "click", function(){
		window.location = jQuery( 'a', this ).first().attr( 'href' );
	});
}

/*--- BLOG ---*/
jQuery( "body.single-post #sidebar" ).delegate( "article", "click", function(){
	window.location = jQuery( 'a', this ).first().attr( 'href' );
});



/*--- DROPKICK DROPDOWN ---*/
jQuery('#cat').dropkick({ change: function(){ $(this).parent("form").submit() } });

function imageresize() {
	var contentwidth = jQuery('body.home #wrap').width();
	if ((contentwidth) > '1440'){
		jQuery('body.home').addClass('largest');
	} else if ((contentwidth) > '1366'){
		jQuery('body.home').addClass('large');
	} else if ((contentwidth) > '1280'){
		jQuery('body.home').addClass('med');
	} else {
		jQuery('body.home').addClass('small');
	}
}


/*--- DROPKICK DROPDOWN ---*/
imageresize();//Triggers when document first loads    

jQuery(window).bind("resize", function(){//Adjusts image when browser resized
	imageresize();
});


}); /* END: jQuery document.ready actions */

