You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.7 KiB
88 lines
2.7 KiB
$(document).ready(function() {
|
|
$('.has-datepicker').datepicker({dateFormat: 'dd.mm.yy'});
|
|
$('#reasons').mouseout(function(e){
|
|
$('.extended-block').removeClass('active');
|
|
$('.extended-block-more').hide();
|
|
$('.extended-triangle').hide();
|
|
});
|
|
$('.extended-block').mouseover(function(e){
|
|
$('.extended-block').removeClass('active');
|
|
$('.extended-block-more').hide();
|
|
$('.extended-triangle').hide();
|
|
$(this).find('.extended-block-more').show();
|
|
$(this).find('.extended-triangle').show();
|
|
$(this).addClass('active');
|
|
});
|
|
$('#why_register').mouseout(function(e){
|
|
$('.desc-block').removeClass('active');
|
|
$('.desc-block-more').hide();
|
|
$('.desc-triangle').hide();
|
|
});
|
|
$('.desc-block').mouseover(function(e){
|
|
e.preventDefault();
|
|
$('.desc-block').removeClass('active');
|
|
$('.desc-block-more').hide();
|
|
$('.desc-triangle').hide();
|
|
$(this).find('.desc-block-more').show();
|
|
$(this).find('.desc-triangle').show();
|
|
$(this).addClass('active');
|
|
});
|
|
$('#other_docs').mouseover(function(e){
|
|
$('.other_docs_menu').show();
|
|
});
|
|
$('.other_docs_menu').mouseout(function(e){
|
|
$('.other_docs_menu').hide();
|
|
});
|
|
$('#other_docs').mouseout(function(e){
|
|
$('.other_docs_menu').hide();
|
|
});
|
|
$('.close-message').click(function(e){
|
|
e.preventDefault();
|
|
$(this).closest('li').hide();
|
|
var close_action = $(this).data('close');
|
|
$.cookie(close_action, true, {path: '/'});
|
|
});
|
|
|
|
$('.captcha_refresh').click(function(e) {
|
|
e.preventDefault();
|
|
var $form = $(this).parents('form');
|
|
var url = location.protocol + "//" + window.location.hostname + ":"
|
|
+ location.port + "/captcha/refresh/";
|
|
|
|
$.getJSON(url, {}, function(json) {
|
|
$form.find('input[name="captcha_1"]').val('');
|
|
$form.find('input[name="captcha_0"]').val(json.key);
|
|
$form.find('img.captcha').attr('src', json.image_url);
|
|
});
|
|
});
|
|
});
|
|
|
|
function fetch_data(url, async) {
|
|
// makes ajax call (synced by default)
|
|
var result = null;
|
|
$.ajax({
|
|
'async': async || false,
|
|
'global': false,
|
|
'cache': false,
|
|
'url': url,
|
|
'dataType': "json",
|
|
'timeout': 30000,
|
|
'success': function (data) {
|
|
result = data;
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
function getUrlVars() {
|
|
var vars = [], hash;
|
|
var href = window.location.href;
|
|
var hashes = href.slice(href.indexOf('?') + 1).split('&');
|
|
for (var i=0; i<hashes.length; i++) {
|
|
hash = hashes[i].split('=');
|
|
vars.push(hash[0]);
|
|
vars[hash[0]] = hash[1];
|
|
}
|
|
return vars;
|
|
}
|
|
|
|
|