	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() {
    jQuery('.bannertracker').click(function(e) {
        link = '/bannertracker.php?tracker='+this.id;
        dataString = '';
		jQuery.ajax({
            type: "POST",
            data: dataString,
            url: link,
            success: function(data) {
            }
        });
    });
})


function submitcomment(){

        var dataString = jQuery('#commForm').serialize();
        var link = jQuery('#link').val();

        jQuery('#commentform').height(jQuery('#commentform').height());
        jQuery('#commentform').html("");

        jQuery('#commentform').addClass("loadingcommentform");

        jQuery.ajax({
            type: "POST",
            url: "/"+language+"/news/",
            data: dataString,
            success: function(data) {
                if(data=='1'){
                    window.location.reload();
                }else{
                    jQuery('#commentform').html(data);
                    jQuery('#commentform').height('');
                    jQuery('#commentform').removeClass("loadingcommentform");
                }
            }
        });


}

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();
              }
            }
        );
}




