
$(document).ready(function () {
	init();
});
function init() {
	
	
	
	$('.other_tags_button').hover(function () {
		$('#tag_menu').fadeIn('fast');
	});
	$('.other_tags_button').hover(function () {
		$(this).addClass("active");
		if ($('#tag_menu ul').css('display') == 'none') {
			$('#tag_menu ul').slideDown();
		}
	
	});
	
	//bb fix
	
	$('.other_tags_button').click(function () {
		$('#tag_menu').fadeIn('fast');
	});
	$('.other_tags_button').click(function () {
		$(this).addClass("active");
		if ($('#tag_menu ul').css('display') == 'none') {
			$('#tag_menu ul').slideDown();
		}
	
	});
	
	
	$('#tag_menu:not(.blog)').hover(function () {
		$('#tag_menu ul').stop(true, true);
		$('.other_tags_button').removeClass("active");
	},
	function () {
		$('#tag_menu ul').animate({
			opacity: '1'
		},
		1000).slideUp('fast', function () {
			$('#tag_menu').fadeOut('fast');
			$('.other_tags_button').removeClass("active");
		});
	});
	
	
	
	//hover
	
	$('.client_module').hover(function () {
		$(this).addClass('panel_on')
		$('.client_hover_panel', $(this)).fadeIn('fast');
	},
	function () {
		$('.client_hover_panel', $(this)).fadeOut('fast');
		$(this).removeClass('panel_on')
	})
	$('.module').hover(function () {
		
		
			$(this).animate({
				backgroundColor: '#871c4b'
			},
			'fast')
		
		
	},
	function () {
		
			$(this).removeClass('hover')
			$(this).animate({
				backgroundColor: '#df3d82'
			},
			'fast')
		
		var module_image = $(this).children('a.inner').children('div.module_body').children('div.module_body_inner').children('img');
		if (module_image.length > 0) {
			module_image.show();
		}
	})
	
	
	
	
	//bb fix
	
	$('.client_module').click(function () {
		$(this).addClass('panel_on')
		$('.client_hover_panel', $(this)).fadeIn('fast');
	},
	function () {
		$('.client_hover_panel', $(this)).fadeOut('fast');
		$(this).removeClass('panel_on')
	})
	$('.module').hover(function () {
		
		
			$(this).animate({
				backgroundColor: '#871c4b'
			},
			'fast')
		
		
	},
	function () {
		
			$(this).removeClass('hover')
			$(this).animate({
				backgroundColor: '#df3d82'
			},
			'fast')
		
		var module_image = $(this).children('a.inner').children('div.module_body').children('div.module_body_inner').children('img');
		if (module_image.length > 0) {
			module_image.show();
		}
	})
	
	
	
}
