$(document).ready(function(){

	$('.genderSelect a, .ageSelect a').click(function() {
		var selector = $(this).attr('href').substr($(this).attr('href').indexOf('#')+1);

		$('.beforeafter_gallery').find('div.beforeafter_item').show();
		$('.genderSelect a, .ageSelect a').css('fontWeight', 'normal');
		
		if (selector.indexOf('All') < 0) {
			$('.beforeafter_gallery > div:not(.'+selector+')').hide();
			$(this).css('fontWeight', 'bold');
		}		
		
	});
	$('a.gsc-go').click(function() {$('#cse-search-box').submit(); return false;});
		$('input.gsc-input').inputclear();

	$('li:has(a[href*=events]) ul').hide();
	$('#header_logo').click(function() {
		window.location = '/';
	});
	$('a[href*=fiber-calculator]').click(function() {
		window.open(this.href, 'FiberCalculator', 'menubar=0,width=900,height=700,status=0,toolbar=0,scrollbars=0,resizable=0');
		return false;
	});
	
});
