$(document).ready( function() {

        $('#tabs').tabs();

	/*httpspath = "https://" + window.location.hostname;*/
	path = "http://" + window.location.hostname;

	$('#ajaxterm-frame').attr("src",path+":443");
	$('#torrentflux-frame').attr("src",path+"/torrentflux");
	$('#ampache-frame').attr("src",path+"/ampache");
	$('#gallery-frame').attr("src",path+"/gallery2");
	$('#video-frame').attr("src",path+"/file.php");

	$('#ajaxterm-breakout').attr("href", path+":443");
        $('#torrentflux-breakout').attr("href",path+"/torrentflux");
        $('#ampache-breakout').attr("href",path+"/ampache");
        $('#gallery-breakout').attr("href",path+"/gallery2");
        $('#video-breakout').attr("href",path+"/file.php");


	$('.a-button').hover(
		function () {
			$(this).addClass("ui-state-active");
			$(this).removeClass("ui-state-default");
		}, 
		
		function () {
			$(this).removeClass("ui-state-active");
                        $(this).addClass("ui-state-default");
		}
	);
});
