$(function() {
});

$(document).ready(function() {

	$(".slidetabs").tabs(".hp-images > div", {
		effect: 'fade',
		fadeOutSpeed: "slow",
		rotate: true
	}).slideshow({autoplay: true});


	$('.link').mouseenter(function () {
		var sub_class_name = $(this).attr('id')+'_sub';
		$('#'+sub_class_name).stop(true, true).fadeTo(400, .95, function() {
		});
	});
	
	$('.link').mouseleave(function (e) {
		var sub_class_name = $(this).attr('id')+'_sub';
		$('#'+sub_class_name).stop(true, true).fadeTo(400, 0, function() {
		});
		$('.subnav').hide();
	});
	
	$('.subnav').mouseenter(function (e) {
		var class_name = $(this).attr('id');
		var link = class_name.replace('_sub', '')
		$('#'+link).addClass("sub-roll");
	//	alert(link);
		$('#'+class_name).show();
	});
	
	$('.subnav').mouseleave(function (e) {
		var class_name = $(this).attr('id');
		var link = class_name.replace('_sub', '')
		$('#'+link).removeClass("sub-roll");
		$(this).hide();
	});

	$(".items div img[title]").tooltip({position: "bottom center", effect: 'slide'});

	$(".scrollable").scrollable();
});

