jQuery.noConflict();
jQuery(document).ready(function($) {
	$('.widget:last').addClass('last');
	
/*
	var tb = 1;
	$('#access').find('li').each(function() {
		$(this).addClass('t'+tb);
		$(this).children('a').wrapInner('<span class="hidden" />');
		tb++;
	});
*/
	
	$('#blog-title').find('a').text('');
	
	$('#branding').append('<a href="#" class="btn-bookmark" id="add-favourites" />');
	$("#add-favourites").click(function() {
		this.style.behavior='url(#default#homepage)';
		this.setHomePage('http://www.associaliving.com/');
		return false;
	});
	
	
	if ($('#slider').length > 0) {
		$('#slider').anythingSlider({
			width               : 634,        // if resizeContent is false, this is the default width if panel size is not defined
			height              : 389,        // if resizeContent is false, this is the default height if panel size is not defined
			resizeContents      : false
		});
	}
	
/* 	WHYYY!YY! */
	var tn = 1;
	$('.thumbNav li').each(function() {
		$(this).addClass('tn'+tn);
		$(this).children('a').wrapInner('<span class="hidden" />');
		tn++;
	});
	
	if ($('.list-feat').length > 0) {
		var lf = $('.list-feat').outerHeight() + 37;
		var lp = $('.latest-post').outerHeight();
		
		if (lf > lp) {
			$('.latest-post').css('height',lf+'px');
		}else{
			$('.list-feat').css('height',lp+'px');
		}
	}
	
	if ($('.enh_rp').length > 0) {
		$('.enh_rp').append('<span class="bottom">&nbsp;</span>');
		$('.enh_rp').wrapInner('<div class="box" />');
		var c = 1;
		$('.enh_rp').find('li').each(function() {
			$(this).children('a').prepend(c+'. ');
			c++;
		});
	}
	
	if ($('.popular-posts').length > 0) {
		$('.popular-posts').append('<span class="bottom">&nbsp;</span>');
		$('.popular-posts').wrapInner('<div class="box" />');
		$('.popular-posts').find('li:even').addClass('even');
		var c = 1;
		$('.popular-posts').find('li').each(function() {
			$(this).children('a').prepend(c+'. ');
			c++;
		});
	}
	
	$('.widgetcontainer:last-child').addClass('last');
	
	if ($('.single').length > 0) {
		$('#container').removeAttr('id').attr('id','container-post');
		$('#content').removeAttr('id').attr('id','content-post');
	}
	
	if ($('.s-category-association-times').length > 0){
		$('#content-post').prepend('<div class="headings"><h2><span class="hidden">Association Times | A Resource for Community Associations</span></h2></div>');
	}
	
	$('.share-socials').appendTo('#access');
	
});

