jQuery(document).ready(function($) {
    var aio = $('.dwd-aio').length;
    for (i = 0; i < aio; i++) {
        var url = $(".et_pb_aio_extended_" + i + ".dwd-aio.dwd-whole-link").data('dwd-link');
        var video = $(".et_pb_aio_extended_" + i + ".dwd-aio");
    	if ($(video).hasClass('dwd-whole-video')) {
    		$(".et_pb_aio_extended_" + i + ".dwd-aio.dwd-whole-link .et_pb_blurb_content").wrap("<a data-rel='lightcase' class='dwd-whole-link-window' href='" + url + "'> </a>");
    	} else {
        	$(".et_pb_aio_extended_" + i + ".dwd-aio.dwd-whole-link .et_pb_blurb_content").wrap("<a href='" + url + "' class='dwd-whole-link-window'> </a>");
    	};
        $('.dwd-aio.dwd-new-window a.dwd-whole-link-window').attr('target', '_blank');
    }
});
