function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function MM_effectSlide(targetElement, duration, from, to, toggle)
{
Spry.Effect.DoSlide(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function goToEvent() {
var email = $('#registerEmail').val();
var eId = $('#registerEventId').val();
var registerPassword = $('#registerPassword').val()
var password = '';
if ($('#eventPassword').length) {
password = $('#eventPassword').val();
}
$.ajax({
type: "POST",
url: "registration_ajax.php",
data: "act=gotoEvent&eventId="+eId+"&email="+email+"&eventPassword="+password+"®isterPassword="+registerPassword,
success: function(msg){
$('#registerToEvent').html(msg);
}
});
}
function rememberPassword(url) {
new Boxy('
', {title : 'Parooli meelde tuletus', modal: true});
}
function rememberPasswordSend(form) {
var theForm = typeof form != 'object' ? document.getElementById(form): form;
Spry.Utils.submitForm(theForm, updateRememberPasssword, {additionalData:'act=validateForm'});
return false;
}
function updateRememberPasssword(req)
{
response = req.xhRequest.responseText.split("|");
if (response[0]>0) {
$('#boxyRememberPassword').css('display','none');
}
$('#boxyRememberPasswordResponse').html(response[1]);
}
function boxRegistration() {
$.ajax({
type: "POST",
url: "registration_ajax.php",
data: "act=getForm",
success: function(msg) {
new Boxy(msg, {title: "Registreeri üritusele", modal: true});
}
});
}
// loginTo events functions start
function boxLogInToEvents(url) {
$.ajax({
type: "POST",
url: url,
data: "act=getLoginForm",
success: function(msg) {
new Boxy(''+msg+'
', {title: "Logi sisse", modal: true});
}
});
}
function logIntoEvents(url) {
email = $('#userEmail').val();
password = $('#userPassword').val()
$.ajax({
type: "POST",
url: url,
data: "act=logIn&email="+email+"&password="+password,
success: function(msg){
$('#boxLogIntoEventsResponse').html(msg);
}
});
}
// loginTo events functions end
$('#registerEventId').live("blur", function() {
var eId = $(this).val();
$.ajax({
type: "POST",
url: "registration_ajax.php",
data: "act=getEventName&eventId="+eId,
success: function(msg) {
$('#js_eventName').html(msg);
}
});
});
function loginfocus() {
if ($('#user').val() == "kasutaja") {
$('#user').val('');
}
}
function loginblur() {
if ($('#user').val() == '') {
$('#user').val("kasutaja");
}
}
function passwordfocus() {
if ($('#password').val() == "parool") {
$('#password').val('');
}
}
function passwordblur() {
if ($('#password').val() == '') {
$('#password').val("parool");
}
}
/*
function tooltip(url,txt) {
var container = $('');
$('body').append(container);
$('#tooltipPopupContent').html(' ');
var pos = $('#tooltipPopupContent').offset();
var width = $('#tooltipPopupContent').width();
$('#tooltipPopupContent').css({
left: (pos.left + width) + 'px',
top: pos.top - 5 + 'px'
});
$.ajax({
type: 'POST',
url: ?lang=et&page=ajax-calls,
data: "act=getTooltip&tooltipKey="+txt,
success: function(data)
{
$('#tooltipPopupContainer').html(data);
}
});
$('#tooltipPopupContent').css('display','block');
}
*/
/*
$(document).ready(function(){
var hideDelay = 500;
var currentID;
var hideTimer = null;
// One instance that's reused to show info for the current person
var container = $('');
$('body').append(container);
$('.tooltipPopupTrigger').live('mouseover', function()
{
alert(1);
// format of 'rel' tag: pageid,personguid
// var settings = $(this).attr('rel').split(',');
//var pageID = settings[0];
//currentID = settings[1];
// If no guid in url rel tag, don't popup blank
//if (currentID == '')
// return;
if (hideTimer)
clearTimeout(hideTimer);
var pos = $(this).offset();
var width = $(this).width();
container.css({
left: (pos.left + width) + 'px',
top: pos.top - 5 + 'px'
});
$('#tooltipPopupContent').html(' aaaa');
$.ajax({
type: 'GET',
url: 'personajax.aspx',
data: 'page=' + pageID + '&guid=' + currentID,
success: function(data)
{
// Verify that we're pointed to a page that returned the expected results.
if (data.indexOf('personPopupResult') < 0)
{
$('#personPopupContent').html('Page ' + pageID + ' did not return a valid result for person ' + currentID + '.
Please have your administrator check the error log.');
}
// Verify requested person is this person since we could have multiple ajax
// requests out if the server is taking a while.
if (data.indexOf(currentID) > 0)
{
var text = $(data).find('.personPopupResult').html();
$('#personPopupContent').html(text);
}
}
});
container.css('display', 'block');
});
/*
$('.personPopupTrigger').live('mouseout', function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
});
// Allow mouse over of details without hiding details
$('#personPopupContainer').mouseover(function()
{
if (hideTimer)
clearTimeout(hideTimer);
});
// Hide after mouseout
$('#personPopupContainer').mouseout(function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
});
});
*/
$(function()
{
var hideDelay = 50;
var currentID;
var hideTimer = null;
// One instance that's reused to show info for the current person
var container = $('');
$('body').append(container);
$('.personPopupTrigger').live('mouseover', function()
{
// format of 'rel' tag: pageid,personguid
var translateTxt = $(this).attr('rel');
if (hideTimer)
clearTimeout(hideTimer);
var pos = $(this).offset();
var width = $(this).width();
container.css({
left: (pos.left + width) + 'px',
top: pos.top - 5 + 'px'
});
$('#personPopupContent').html(' ');
$.ajax({
type: 'POST',
url: '?lang=et&page=ajax-calls',
data: "act=getTooltip&tooltipKey="+translateTxt,
success: function(data)
{
$('#personPopupContent').html(data);
}
});
container.css('display', 'block');
});
$('.personPopupTrigger').live('mouseout', function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
});
// Allow mouse over of details without hiding details
$('#personPopupContainer').mouseover(function()
{
if (hideTimer)
clearTimeout(hideTimer);
});
// Hide after mouseout
$('#personPopupContainer').mouseout(function()
{
if (hideTimer)
clearTimeout(hideTimer);
hideTimer = setTimeout(function()
{
container.css('display', 'none');
}, hideDelay);
});
});