$(document).ready(function() {
$('#shuka_sign').fadeTo(0, 0.6);
$('.menu img').fadeTo(0, 0.6);

$('#logolink').hover(
	function() {
		$('#shuka_sign').fadeTo(0, 1);
	},
	function() {
		$('#shuka_sign').fadeTo(0, 0.6);
	
});

$('.menu img').hover(
	function() {
		$(this).fadeTo(0, 1);
	},
	function() {
		$(this).fadeTo(0, 0.6);
});

$('#designmenu').click(function() {
	$('.designmenu').toggle(100);
});

scrollheight = $(window).height() - (65 *2);
$("div.contacts").css("top",$(window).height() -48);

if(scrollheight < 470) {
	scrollheight = 470;
$("div.contacts").css("top",550);

}
scrollwidth = $(window).width();
if(scrollwidth < 980) {
	scrollwidth = 980
}

$("#bigsheet").css("height",scrollheight);
$("div.menu").css("left", scrollwidth -525);

x = -2880 +scrollwidth;
y = -2100 +scrollheight +65;
$("#scroller").draggable({
	containment:[x,y,0,65],
	start:function(event, ui) {
		$(this).css('cursor', 'url(/img/closedhand.cur), move');
	},
	stop:function(event, ui) {
		$(this).css('cursor', 'url(/img/openhand.cur), move');
	}
	});
	
$(window).resize(function() {

scrollheight = $(window).height() - (65 *2);
$("div.contacts").css("top",$(window).height() -48);

if(scrollheight < 470) {
	scrollheight = 470;
$("div.contacts").css("top",550);

}
scrollwidth = $(window).width();

if( scrollwidth < 980 ) {
	scrollwidth = 980
}

$("#bigsheet").css("height",scrollheight);
$("div.menu").css("left",scrollwidth -525);

x = -2880 +scrollwidth;
y = -2100 +scrollheight +65;

$("#scroller").draggable('option', 'containment', [x,y,0,65]);
});

$('#switcher a').click(function(e) {
	e.preventDefault();
	if($(this).attr('class') != 'inactive') {
		$('#switcher a.inactive').attr('class', '');
		$(this).attr('class', 'inactive');
		$('#text').toggle();
		$('#contacts').toggle();
	}
});

});
