		/*pic1= new Image();
		pic1.src="/_gfx/bg/1.jpg";
		pic2= new Image();
		pic2.src="/_gfx/bg/about_1.jpg";
		pic3= new Image();
		pic3.src="/_gfx/bg/about_2.jpg";
		pic4= new Image();
		pic4.src="/_gfx/bg/about_3.jpg";
		pic5= new Image();
		pic5.src="/_gfx/bg/contacts.jpg";
		pic6= new Image();
		pic6.src="/_gfx/bg/dealers.jpg";
		pic7= new Image();
		pic7.src="/_gfx/bg/news.jpg";
		pic8= new Image();
		pic8.src="/_gfx/bg/product_1.jpg";
		pic9= new Image();
		pic9.src="/_gfx/bg/product_2.jpg";
		pic10= new Image();
		pic10.src="/_gfx/bg/product_3.jpg";
		pic11= new Image();
		pic11.src="/_gfx/bg/technical_1.jpg";
		pic11= new Image();
		pic11.src="/_gfx/bg/technical_2.jpg";
		pic11= new Image();
		pic11.src="/_gfx/bg/technical_3.jpg";
		*/
		
		// Cufon.replace('.front_title, .page_title, .fontbox_content h2, .page_subtitle, .about_data .content,  .news_content .content, .dealers_data .content, .technical_data .content, .gallery_intro', { hover: true, fontFamily: 'Whitney Light' });
		// Cufon.replace('.page_slogan, .product_data .content, .news_date,  .page_menu,.contact_text', { hover: true, fontFamily: 'Whitney Book' });
		
			hs.graphicsDir = '_gfx/highslide/graphics/index.html';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.wrapperClassName = 'floating-caption borderless text-controls';
	hs.fadeInOut = true;
	hs.dimmingOpacity = .90;
	hs.numberOfImagesToPreload =0;
var fadeTime = 200;
var fadeTimeBg = 400;
var currentPicture = 1;
var autoplayTimer;
var autoplayTime = 3500;
var autoplayChangePictureTime = 2500;


	hs.registerOverlay({
		thumbnailId: null,
		overlayId: 'gallery_controlbar_next',
		position: 'bottom right',
		hideOnMouseOut: false,
		offsetY: 20,
		opacity: 0.8
		});
	hs.registerOverlay({
		thumbnailId: null,
		overlayId: 'gallery_controlbar_prev',
		position: 'bottom left',
		hideOnMouseOut: false,
		offsetY: 20,
		opacity: 0.8
		});
	hs.registerOverlay({
		thumbnailId: null,
		overlayId: 'gallery_controlbar_close',
		position: 'top right',
		hideOnMouseOut: false,
		offsetY: -20,
		opacity: 0.8
		});
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: false,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .6,
			position: 'bottom',
			offsetY: 30,
			//offsetX: -10,
			hideOnMouseOut: false
		}
	});
		
$(document).ready(function() {
		
		$("#loading_screen").remove();
		//$(".frontbox").css('height','0');
		//$('.frontbox').fadeOut(900);
		var aknakorgus = $(window).height();						   
		var aknalaius = $(window).width();
		$(".pagebox,.bgimage, .left_panel, .left_panel .contentbox .content").height(aknakorgus);
		$(".pagebox, .bgimage ").width(aknalaius);
		var kogulaius = noOfDivs * 100;
		var lehelaius = 100/  noOfDivs;
		$("#pages .page").width(lehelaius+"%");
		$("#pages").width(kogulaius+"%");
		/*
		var kogulaius = noOfDivs * aknalaius;
		var lehelaius = aknalaius;
		$("#pages .page").width(lehelaius);
		$("#pages").width(kogulaius);
		*/
		
		$('img.maximage').maxImage({
			isBackground: true,
			verticalAlign: 'top',
			overflow: 'auto',
			//zIndex:'1',
			position:'positive'
			});							   
		
		$('.frontlang ul.link_list li a').click(function(){
			var _url = $(this).attr('href');
			$(this).parents('.frontlang').slideUp('medium', function(){
				location.href = _url;
			});
			return false;
		});
		
		/* News menu */
		$("#news_menu a").click(function() {
			if ($(this).hasClass("active"))
				return;
			$("#news_menu a").removeClass("active");
			$(this).addClass("active");
				var id = $(this).attr("id").split("_")[1];
			$(".content_box:visible").fadeOut(fadeTime, function() {
				$("#newsbox_" + id).fadeIn(fadeTime);
			});
		});
		
		/* Dealers tmp */
		$("#dealers_menu a").click(function() {
			if ($(this).hasClass("active"))
				return;
			$("#dealers_menu a").removeClass("active");
			$(this).addClass("active");
				var id = $(this).attr("id").split("_")[1];
			$(".dealersbox:visible").fadeOut(fadeTime, function() {
				$("#" + id).fadeIn(fadeTime);
			});
		});

		
	
		
		
});

$(document.documentElement).keyup(function (event) {
  // handle cursor keys
  if (event.keyCode == 37) {
    // go left
	_scrollToPrevious();
	
  } else if (event.keyCode == 39) {
    // go right
	_scrollToNext();
  }
});

$(window).load(function () {
	$("#sitemenu ul").slideDown('medium');
	$("#navigation").slideDown('medium');
});


$(window).resize(function() {
		var aknakorgus = $(window).height();						   
		var aknalaius = $(window).width();
		$(".pagebox,.bgimage, .left_panel, .left_panel .contentbox .content").height(aknakorgus);
		$(".pagebox, .bgimage ").width(aknalaius);
		});


