
$(document).ready(function() {

    $("#accordion").accordion({
    	header: 'h6',
    	collapsible: true,
    	active: false,
    	autoHeight: false
    });

	$(".reqinf").click(function(){
		$("#requestinfo").slideToggle(400);
		$(this).toggleClass("active"); return false;
	});

});


function login()
{
  var logintype = document.forms.enter.logintype.value;
  document.forms.enter.action = 'http://'+logintype+'.ibs-host.com/login/';
  return true;
}

function checkform()
{
  var user = document.forms.enter.user.value;
  var pass = document.forms.enter.pass.value;

  if ( (user == 'Пользователь') || user < 2 )
  {
    alert("Введите имя пользователя!");
    document.forms.enter.user.focus();
    return false;
  }
  if ( (pass == 'Пароль') || pass < 2 )
  {
    alert("Заполните поле пароль!");
    document.forms.enter.pass.focus();
    return false;
  }
  return true;
}


$(window).load(function(){
	//set and get some variables
	var thumbnail = {
		effectDuration : 400, /* the duration of the effect (zoom and caption) */
        imgWidth : $('.caption-wrapper').find('img').width(),
        imgHeight : $('.caption-wrapper').find('img').height()
	};
	//make the list items same size as the images
	$('.caption').css({
		'width' : thumbnail.imgWidth
	});
	//when mouse over the list item...
	$('.caption-wrapper').hover(function(){
		//show the caption using slideDown event
		$(this).find('.caption:not(:animated)').slideDown(thumbnail.effectDuration);
	//when mouse leave...
	}, function(){
		//hide the caption using slideUp event
		$(this).find('.caption').slideUp(thumbnail.effectDuration);

	});
});

