	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(){
    var dataString = jQuery('#questionform').serialize();
    //alert(dataString);
    jQuery('#questionresults').html('');
    jQuery('#questionresults').addClass('footerloading');
    //return;
    jQuery.ajax({
        type:'post',
        data: dataString,
        url:'/'+language+'/questions/ask_question/',
        success: function (data) {
             jQuery("#question-form-container").html(data);
             //jQuery('#question_loading').hide();
          }
        }
    );
}

function seo(){
    var dataString = jQuery('#seoform').serialize();
    jQuery('#seoresults').html('');
    jQuery('#seoresults').addClass('footerloading');
    jQuery.ajax({
        type:'post',
        data: dataString,
        url:'/'+language+'/questions/seo/',
        success: function (data) {
            //alert(data);
            jQuery("#seoresults").html(data);
            jQuery('#seoresults').removeClass('footerloading');
        }
        }
    );
}

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 select_news(p){
    jQuery('.page a').removeClass('active');
    jQuery('#page-'+p).addClass('active');
    jQuery('.news-item').hide();
    jQuery('#news-item-'+p).show();
}
/* Aplication Question form */ 

function count_click(id_template){
    alert(id_template);
}

function switch_bg(color){
    //jQuery('#header').addClass('header-'+color);
    jQuery('#header').css('background','url(/images/body/top-bg-'+color+'.png)');

    jQuery.ajax({
        type:'post',
        data: 'color='+color,
        url:'/'+language+'/system/bgcolor/',
        success: function (data) {
        }
    });

}

function show_portfolio_image(img,id){
    jQuery('.portfolio-image').hide();
    jQuery('#'+img).fadeIn();

    jQuery('.portfolio-switch a').removeClass('active-switch');
    jQuery('#switch'+id+' a').addClass('active-switch');
}



