// JavaScript Document
$(function(){
    var getHighlights = $('div.highlightElement, div.halfElement, div.tMonial');
    $(getHighlights).wrap('<div class=\'shade\'></div>').prepend('<div class=\'trigger\'></div>');
    $('.trigger').css({
        'position': 'absolute',
		top: 0,
		left: 0,
        height: '100%',
        width: '230px',
        'z-index': '100',
		background: '#fff',
		opacity: .01,
		'cursor': 'pointer',
		'overflow': 'hidden'
    })
    $('.shade').css({
        'background': '#000'
    })
    
    $('.trigger').hover(function(event){
		event.stopPropagation();
        if ($(event.target).is('.trigger')) {
            $(this).parent().filter('div').animate({
                opacity: .75
            });
        }
    }, function(event){
		event.stopPropagation();
        if ($(event.target).is('.trigger')) {
			$(this).parent().filter('div').animate({
				opacity: 1
			});
		}
    }).click(function(){
        window.location.href = $(this).parent().attr('href');
    });
    
});
