$(document).ready(function(){

	// Lowering the opacity of all slide in divs
	$('.banner2 div').css('opacity',0.5);

	// Using the hover method 
	$('.banner2').hover(function(){

		// Executed on mouseenter
		
		var el = $(this);
		
		// Find all the divs inside the banner2 div,
		// and animate them with the new size
		
		el.find('div').stop().animate({width:240,height:240},'slow',function(){
			// Show the "Visit Company" text:
			el.find('p').fadeIn('fast');
		});

	},function(){

		// Executed on moseleave

		var el = $(this);
		
		// Hiding the text
		el.find('p').stop(true,true).hide();
		
		// Animating the divs
		el.find('div').stop().animate({width:60,height:60},'fast');

	}).click(function(){
		
		// When clicked, open a tab with the address of the hyperlink
		
		if($(this).find('a').attr('href')=="") {
			stop;
		} else {
			var ender = $(this).find('a').attr('href');
			var site = ender.split('.');
			if (site[0]=='http://www'){ 
				window.open(ender);
			}else{
				location.href=''+ender+'';
			}
		}
		
	});
});
