// JavaScript Document
// Скрипт показывает и прячет блок
$(document).ready(function(){
    $('#slide-spoiler').hide()
    $('#press-label').click(function(){
        $('#slide-spoiler').slideToggle("slow");
    })
});

// Скрипт меняет плюс на минус
function ShowOrHide()
{
	var inputTag = document.getElementById("image-spoiler");
	var defaultValueOfTag = "";
	
	if (inputTag.hasAttribute("src"))					// если есть атрибут src
	defaultValueOfTag = inputTag.getAttribute("src");	// читаем атрибут src
	
	if(defaultValueOfTag == "images/spoiler-minus.gif")
	{
		inputTag.setAttribute("src", "images/spoiler-plus.gif"); // меняем значение src на spoiler-minus.gif
	}
	else
	{
		inputTag.setAttribute("src", "images/spoiler-minus.gif"); // меняем значение src на spoiler-plus.gif
	}
}

// Скрипт, который показывает стрелку с задержкой
/*function ShowArrow()
{
	var arrow = document.getElementById("slide-arrow");
	arrow.setAttribute("style","display:block;");
}
setTimeout(ShowArrow, 3000);
*/


$(document).ready(function(){
	setTimeout("$('#slide-arrow').fadeIn('slow')", 3000);
	setInterval("$('#slide-arrow').animate({right:'-120px'}, 400).animate({right:'-110px'}, 100).animate({right:'-115px'}, 200).animate({right:'-110px'}, 150);", 4000);
});

function arrowClosed()
{
	$('#slide-arrow').fadeOut('slow');
}

$(function(){
	$('#dk1').hover(function(){
			$('#dk1 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk1 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk2').hover(function(){
			$('#dk2 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk2 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk3').hover(function(){
			$('#dk3 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk3 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk4').hover(function(){
			$('#dk4 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk4 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk5').hover(function(){
			$('#dk5 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk5 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk6').hover(function(){
			$('#dk6 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk6 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk7').hover(function(){
			$('#dk7 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk7 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk8').hover(function(){
			$('#dk8 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk8 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});

$(function(){
	$('#dk9').hover(function(){
			$('#dk9 .dk-hide').stop().animate({
				"text-indent":"0",
				opacity:"1",
				width:"150%",
				height:"150%",
				left:"-25%",
				top:"-25%"},
				200);
			},
		function(){
			$('#dk9 .dk-hide').stop().animate({
				"text-indent":"-9999px",
				opacity:"0",
				width:"100%",
				height:"100%",
				left:"0",
				top:"0"},
				400);
			});
});
