(function ($) {
	$(document).ready(function() {
		$('.Accordion').accordion({
			autoheight: false,
			alwaysOpen: false,
			active: false, 
			header: 'h4'
		});

		$('ul.Tabs').tabs('div.Panes > div');

		/*$('select').selectbox();*/
		$('table tr:nth-child(odd)').addClass('Odd'); 
		
		/* Start slideshow */
		if ($(".slideshow").length > 0) {
			$('.slideshow .view').addClass('active');				
			$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 
				$(pager).find('a').removeClass('activePage').filter('a:eq('+currSlideIndex+')').addClass('activePage'); 
			};
			$('.slideshow .view').cycle({
				fx: 'scrollHorz',
				timeout: 5000,
				speed: 400,
				pager: '.slideshow .thumbnails',
				pagerEvent: 'mouseover',
				pagerAnchorBuilder: function(idx, slide) { 						
					return '.slideshow .thumbnails li:eq(' + idx + ') a'; 
				}
			});
		}
		
		// AddThis configuration
		var addthis_config = {
			services_compact: 'facebook, twitter, linkedin, email, print, google, stumbleupon, favorites, messenger, myspace, digg'
		}
	});
})(jQuery);
