$(document).ready(function() {
	$("#tabs").tabs({
		show: function(e, ui) {
			$(window).scrollTop(0);
		}
	});
	$("#accordion").accordion({
		autoHeight: false, navigation: true
	});

	//$("a:not[href^=#]").addClass("external"); //.attr({ target: "_blank" });
	$('a:not([href^="#"])').not('a[href$=".user.js"]').addClass("external").click(function() {
		window.open(this.href);
		return false;
	});

	$('a.switchtab').live('click', function() {
		$("#tabs").tabs('select', $(this).attr('href'));
	});

	$(".imgthumb").hover(function() {
		$(this).css({'z-index' : '100'}); /*Add a higher z-index value so this image stays on top*/ 
		$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				width: "200px", /* Set new width */
				padding: '5px',
			}, 200).css({'position': 'absolute', 'z-index': '100'}); /* this value of "200" is the speed of how fast/slow this hover animates */

		} , function() {
		$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
		$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				/* top: '0',*/
				/* left: '0', */
				width: '64px', /* Set width back to default */
				padding: '5px'
			}, 400).css('position', 'relative');
	});
});

