(function($) {
	$(document).ready(function() {
		var images = $('.tpl-slideshow .images img'); if(images.length > 1) { var i = 0; var zIndex = 10; var first = $(images.get(0)); var next = first.next(); var tmp = null; var timeout = null; var switcher = function() { var active = $('.tpl-slideshow .controls .ctrl.active'); var next = active.next(); if(next.length == 0) next = $('.tpl-slideshow .controls').children().first(); $(active[0]).removeClass('active'); $(next[0]).addClass('active'); }; var func = function() { timeout = window.setTimeout(function() { switcher(); next.hide(); next.css('zIndex', ++zIndex); next.fadeIn(2000, function() { tmp = next.next(); if(tmp.length != 0) next = tmp; else next = first;  func();  }); }, 3000); }; images.each(function() { var img = $(this); img.css('zIndex', zIndex - i++); img.css('position', 'absolute'); }); func(); }
		$(".tpl-sidebar.right #secondary ul.xoxo li.widget-container").each(function() { $(this).append('<li class="end"></li>'); });
	});
})(jQuery)


