// Clear Input Field - Plugin Code //
(function(a){jQuery.fn.clearField=function(b){b=jQuery.extend({blurClass:"clearFieldBlurred",activeClass:"clearFieldActive"},b);jQuery(this).each(function(){var c=jQuery(this);if(c.attr("rel")==undefined){c.attr("rel",c.val()).addClass(b.blurClass)}c.focus(function(){if(c.val()==c.attr("rel")){c.val("").removeClass(b.blurClass).addClass(b.activeClass)}});c.blur(function(){if(c.val()==""){c.val(c.attr("rel")).removeClass(b.activeClass).addClass(b.blurClass)}})});return jQuery}})(jQuery);
// On Ready Set Up jQuery Assets and Actions //
$(document).ready(function(){
	// Initiate Pretty Photo Pop Up //					   
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook',show_title:false, hideflash:false});
	// Remove active vote class //
	$('a.vote_btn').click(function(){
		$(this).css({backgroundPosition:'0 -70px'});
		//$('a').removeAttr('href');
		//$('a').attr('href','#vote_message');
	});
	// Clear City Field In Footer Apartment Search & Fields for Credit Score //
	$('#look').clearField();
	$('#firstname').clearField();
	$('#creditlastname').clearField();
	// Apply Custom Form Field Styles To Footer Apartment Search //
	$('select, input:checkbox, input:radio, input:file').uniform();
	// Hid Tabbed Video Details Content
	$('.tab_content').hide();
	// Highlight Active Tab and Show Contents of Video Details //
	$('ul#tabs a:first').addClass('active').show();
	$('.tab_content:first').show();
	// Toggle Active Tab of Video Details //
	$('ul#tabs li').click(function(){
		$('ul#tabs a').removeClass('active');
		$(this).find("a").addClass('active');
		$('.tab_content').hide();
			var activeTab = $(this).find('a').attr('href');
				$(activeTab).fadeIn();
				return false;
		});
	// Set Up Social Share Slide down Menu in Video Details //
	$('a#socialshow').click(function(){
		$('.socialgrid1 #socialinfo').slideToggle('slow');
		return false;
	});
	// Set More Videos Scroller Settings //
	$('#videopane').jcarousel({vertical:true, scroll:1});
	// Apply Rounded Corners to Video Comments //
	$('.post_light').corner('round 8px').parent().css('padding', '3px').corner('round 10px');
	$('.post_dark').corner('round 8px').parent().css('padding', '3px').corner('round 10px');
});
