	hs.graphicsDir = '/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.wrapperClassName = 'wide-border';
	hs.fadeInOut = true;
	hs.dimmingOpacity = .75;
    hs.loadingText = 'Ielādē...';
    hs.closeTitle = 'Aiavērt';
	hs.fullExpandTitle  = 'Palielināt attēlu';
	hs.loadingTitle  = 'Spiest lai atceltu';
	hs.focusTitle  = 'Spiest lai izvirzītu uz priekšu';
	hs.creditsText  = '';
	hs.creditsTitle  = '';
	hs.previousText  = 'Iepriekšējā';
	hs.nextText  = 'Nākošā';
	hs.moveText  = 'Pārvietot';
	hs.closeText  = 'Aivērt';
	hs.closeTitle  = 'Aizvērt (esc)';
	hs.resizeTitle  = 'Mainīt izmēru';
	hs.playText  = 'Sākt spēlēt';
	hs.playTitle  = 'Spēlēt (spacebar)';
	hs.pauseText  = 'Pause';
	hs.pauseTitle  = 'Sākt spēlēt  (spacebar)';
	hs.previousTitle  = 'Iepriekšējā (arrow left)';
	hs.nextTitle  = 'Nākošā (arrow right)';
	hs.moveTitle  = 'Pārvietot';
	hs.fullExpandText  = 'Pilnais izmērs';
	hs.number = 'Attēls %1 no %2';
	hs.restoreTitle  = '';

	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .6,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});

jQuery(document).ready(function() {


})


function genpasts(prefix,postfix)
{
	if (prefix!='' && postfix!='')
	{
		var pasts=prefix;
			pasts=pasts+'@';
			pasts=pasts+postfix;

		document.write('<a href="mailto:'+pasts+'"  <font>'+pasts+'</font></a>');
	}
	else document.write('-');
}

function questionSubmit(l){
    var dataString = jQuery('#applicationform').serialize();

    jQuery('#question_loading').show();
        jQuery.ajax({
            type:'post',
            data: dataString,
            url:'/'+language+'/questions/',
            success: function (data) {
                 jQuery("#questionFormDiv").html(data);
                 jQuery('#question_loading').hide();
              }
            }
        );
}

function page(l){
    var notice = $('contentRefresh');
    $('templates_loading').show();
        var url = SERVER_URL+'gallery/?l='+ l +'&b=1';
        //alert(url);
        var aj = new Ajax.Request(
            url, {
            method:'get',
            onCreate: function(){
              notice.innerHTML = '';
            },
            //parameters: $("questionForm").serialize(),
            onSuccess: function (transport) {
                 var transport_text = transport.responseText;
                 notice.innerHTML = transport_text;
                 $('templates_loading').hide();
              }
            }
        );
}

function submitSmallLogin() {
    var dataString = jQuery('#loginForm').serialize();
    //alert(dataString);
    jQuery('#login_small').hide();
    jQuery('#login_loading').show();
        jQuery.ajax({
            type:'post',
            data: dataString,
            url:'/'+language+'/login/small/',
            success: function (data) {
                 jQuery("#login_small").html(data);
                 jQuery('#login_loading').hide();
                 jQuery('#login_small').show();
              }
            }
        );
}

function submitLargeLogin() {
    var dataString = jQuery('#loginLargeForm').serialize();
    //jQuery('#login_small').hide();
    alert(dataString);
    jQuery('#login_loading_circle').show();

    jQuery.ajax({
        type:'post',
        data: dataString,
        url:'/'+language+'/login/large',
        success: function (data) {
             jQuery(".content").html(data);
             jQuery('#login_loading_circle').hide();
             //jQuery('#login_').show();
          }
        }
    );
}

function passwordReset() {
   var dataString = jQuery('#passwordResetForm').serialize();
    jQuery('#login_small').hide();
    jQuery('#login_loading').show();
        jQuery.ajax({
            type:'post',
            data: dataString,
            url:'/'+language+'/login/password_reset/',
            success: function (data) {
                 jQuery("#login_small").html(data);
                 jQuery('#login_loading').hide();
                 jQuery('#login_small').show();
              }
            }
        );
}

function addToCart() {
   var dataString = jQuery('#gym_form').serialize();
        jQuery.ajax({
            type:'post',
            data: dataString,
            url:'/'+language+'/cart/add/',
            success: function (data) {
                 jQuery("#cart_wrapper").html(data);
              }
            }
        );
}

function deleteFromCart(item) {
   var dataString = jQuery('#cart_form').serialize();
   var in_cart;
   //alert('/'+language+'/cart/delete/'+item+'/');
        jQuery.ajax({
            type:'post',
            data: dataString,
            url:'/'+language+'/cart/delete/'+item+'/',
            success: function (data) {
                 jQuery("#cart_details").html(data);
                 in_cart = jQuery("#cart_counter").attr("title");
                 in_cart = in_cart-1;
                 if (in_cart<1) in_cart = '0';
                 jQuery("#cart_counter").attr("title",in_cart);
                 jQuery("#cart_counter").html(in_cart);
              }
            }
   );
}

function userImageDelete() {
  var dataString = jQuery('#profileForm').serialize();
        jQuery.ajax({
            type:'post',
            data: dataString,
            url: '/'+language+'/labot_profilu/delete_profile_image/',
            success: function (data) {
                 jQuery("#swfuContent").html(data);
              }
            }
        );
}







