$(document).ready(function(){

	$('.social a').hover(function() {
		$(this).fadeTo('fast', 0.65);
	}, function() {
		$(this).fadeTo('fast', 1);
	});

	$('#comcomfeatures .fade').css({opacity: 0.65});

	$('#search form').not('.search').hide();

	$('#search form .search').html('Close Search');

	$('#search h2').click(function () {
		$('#search form').slideToggle('medium');
		if ($(this).html() == 'Close Search') {
			$(this).html('Open Search')
		} else {
			$(this).html('Close Search')
		}
	});

	$('#comcomfeatures').hide().fadeIn('slow').cycle({
		fx:     'fade',
		speed:   800,
		timeout: 8000,
		pause:   1
	});
	/* not working
	 *.hover(function() {
		$(this).children('.fade').fadeTo(1);
	}, function() {
		$(this).children('.fade').fadeTo(0.65);
	});*/
	if ($('#date_from').length > 0) {
		$('#date_from').daterangepicker({appendTo: '#daterange'});
	}

	$('#tweets').cycle({
		fx:     'fade',
		speed:   800,
		timeout: 12000,
		pause:   1
	});

});

