$('#home_modules .module').each(function(){
	$(this).unbind('click').click(function(){
		var href = $(this).find('a').attr('href');
		location.href = href;
		return false;
	});
});

function linkDiv()
{
	var self = this;
	self.init = function()
	{
		$('.outter_success').click(function(){
		var href = $(this).find('.success_module_footer a').attr('href');
		window.location.href = href;
		});
	}
	
	self.init();
}


function linkRelatedSucessDiv()
{
	var self = this;
	self.init = function()
	{
		$('.outter_related_success').click(function(){
		var href = $(this).find('.related_success_module_footer a').attr('href');
		window.location.href = href;
		});
	}
	
	self.init();
}

function linkModules()
{
	var self = this;
	self.init = function() {
		
		$('a.hover_effect').click( function(ev){
	   		//prevent the default action of the event, this will stop the href in the anchor being followed
	   		//before the animation has started, u can also use return false;
	   		ev.preventDefault();
		});
	 
		
		$('.module').click(function(){
			var href = $(this).find('.bottom a').attr('href');
			var target = $(this).find('.bottom a').attr('target');
			if(target == "_blank") {
				window.open(href);
			} else {
				window.location.href = href;
			}
		});
	}
	
	self.init();
}

