﻿/*
Relative Link Rebuilder
Created by Travis Wilson
Exigo Office
Last Updated: 06/20/2011

Requirements:
jQuery 1.3.4 or higher

Purpose:
The content engine will break relative links that point to files found in the Misc. Documents.
This plugin will re-write the offending links to transform them to true, working relative links.
*/

(function ($) { $(document).ready(function () { $('a[href*="ManageWebNet"]').each(function () { var originalHREF = $(this).attr('href'); var newHREF = ''; var HREFArray = originalHREF.split('/'); for (var x = 5; x < HREFArray.length; x++) { if (newHREF.length > 0) newHREF += "/"; newHREF += HREFArray[x] } $(this).attr('href', newHREF) }) }) })(jQuery);
