/* Author: 
	Richard R. Zellner
*/

$j = jQuery.noConflict();


// removes border from second to last menu item
$j('#mainMenu li:last').prev().addClass('noBorder');

// remove footer widget title
$j('.footerWidgetTitle').remove();



// Add Span to Twitter List Items
var content = null;

$j('.twitter-item').each( function(i){
	content = $j(this).html();
	$j(this).html('<span>' + content + '</span>');

});

// Remove Links From RSS Feed in Sidebar
$j('#sidebar .widget_rss ul li a').remove();


// Remove [...] From Bottom of RSS Widget Text
$j('.widget_rss ul li .rssSummary').each( function(i) {
	var oldText = $j(this).html();
	var newText = oldText.substring(0, oldText.length - 4);
	newText = newText + '.. ';
	$j(this).html(newText);
});

// Remove Link From Content Widget Titles
$j('#content .widget_rss .widgetTitle').each( function(i){
	var theTitle = $j(this).children('a:last').html();
	$j(this).html(theTitle);
});

// Replace Content Area RSS Feed List With Paragraphs
var rssContent = $j('#content .widget_rss ul').html()
$j('#content .widget_rss ul').each( function(i){
	$j(this).replaceWith(rssContent); // remove ul tag
});

$j('#content .widget_rss li').each( function(i){
	var rssContent = $j(this).html();
	$j(this).replaceWith('<section>' + rssContent + '</section>'); // replace li tag with section tag
});

$j('#content .widget_rss .rssSummary').each( function(i){
	var rssContent  = $j(this).html();
	$j(this).replaceWith('<p>' + rssContent + '</p>'); // replace .rssSummary div with p tag
});
