$(document).ready(function()	{

 $("li.li_open").click(function () {
    
    if($("ol.ol_slide").hasClass("this_open"))	{	$("ol.ol_slide li.li_close").hide();	$("ol.ol_slide").removeClass("this_open");	}		else	{	$("ol.ol_slide li").show();	$("ol.ol_slide").addClass("this_open");		}
    });
    
/*$('.text input[type=text], .text input[type=password]').click(function()	{	if($(this).hasClass('set')) {}; else	$('.text input[type=text], .text input[type=password]').val("").addClass("set");	});*/


/*$('.glavdiv:odd').css({'background-color' : '#FFFBEF'});*/


$("img.st").click(function()	{

var base = $(window);

var m = $(this).attr('src').match(/^min\/([0-9_]+).jpg/);

$('body').append('<table id="temp" width="'+base.width()+'" height="'+base.height()+'" style="position:absolute;top:0;left:0;"><tr><td align="center"><img src="big/'+ m[1] +'.jpg" style="display:block;margin: auto;" OnClick="close_pic()"></td></tr></TABLE>');


//$("body").append('<img src="' + nt + '" id="temp" style="position: absolute; top: ' + top + 'px; left: ' + left + 'px;" OnClick="close_pic()"/>');

return true;	});		});




function new_win(url,w,h,scroll)	{

w1 = window.open(url,'new_window','resizable=no,menubar=no,status=no,scrollbars=' + scroll + ',width=' + w + ',height=' + h + '');

w1.focus();							}




function locate(url)			{

var url;

id = window.open("","_blank");

id.location.href='http://'+url;	}



function ssn()	{

$.ajax({
			type: 'get',
			url: 'scripty.php',
			data: {act:'search', email:$('input[name=email]').val()},
			error: function()	{	alert("Ошибка подключения к серверу");	},
			success: function(response)	{	$('#hellTitle').html(response);		}
	});			}


function bloknot(nomer)	{

var nomer;

var vSpan = document.getElementById('img'+nomer);

if((vSpan.src=="http://www.raskleischik.ru/img/note1.gif")||(vSpan.src=="http://raskleischik.ru/img/note1.gif")) { vSpan.src="http://www.raskleischik.ru/img/note2.gif"; } else { vSpan.src="http://www.raskleischik.ru/img/note1.gif"; }

$.ajax({
			type: 'get',
			url: 'scripty.php',
			data: {act:'bloknot', nom:nomer},
			error: function()	{	alert("Ошибка подключения к серверу");	},
			success: function(response)	{	$('#helloTitle').text(response);		}
		});					}






function confirmation() {

	var answer = confirm("Вы действительно хотите очистить список?")

	if (answer)	{	window.location = "?erase=1";		}	}








function mailo()	{

$.ajax({
			type: 'get',
			url: 'scripty.php',
			data: {act:'mail', pochta:$('input[name=pochta]').val(), id:$('input[name=num]').val(), textinfo:encodeURIComponent($('textarea').val())},
			error: function()	{	alert("Ошибка подключения к серверу");	},
			success: function(xhr)	{	$('#lay1').hide();	$('#lay55').show();	$('#button1').attr({disabled:disabled});	}
	});				}



function zalobas()	{

$.ajax({
			type: 'get',
			url: 'scripty.php',
			data: {act:'zaloba', ip:$('input[name=ip]').val(), stolb:$('input[name=stolb]').val(), reason:$('select').val()},
			error: function()	{	alert("Ошибка подключения к серверу");	},
			success: function(xhr)	{	$('#lay2').hide();	$('#lay55').show();	$('#button2').attr({disabled:disabled});	}
	});				}




function close_pic()	{	$('#temp').remove();	}