/* e7040fdd78f8abd9abdd7976ce769f28 */

	hs.graphicsDir = '/lib/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	wrapperClassName: 'borderless';
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.75;

  hs.lang = {
     loadingText :     'Načítá se...',
     loadingTitle :    'Klikněte pro zrušení',
     focusTitle :      'Klikněte pro přenesení do popředí',
     fullExpandTitle : 'Zvětšit na původní velikost',
     fullExpandText :  'Plná velikost',
     creditsText :     'Powered by Highslide JS',
     creditsTitle :    'Přejít na stránky Highslide JS',
     previousText :    'Předchozí',
     previousTitle :   'Předchozí (šipka vlevo)',
     nextText :        'Další',
     nextTitle :       'Další (šipka vpravo)',
     moveTitle :       'Přesunout',
     moveText :        'Přesunout',
     closeText :       'Zavřít',
     closeTitle :      'Zavřít (esc)',
     resizeTitle :     'Změnit velikost',
     playText :        'Přehrát',
     playTitle :       'Přehrát slideshow (mezerník)',
     pauseText :       'Pozastavit',
     pauseTitle :      'Pozastavit slideshow (mezerník)',
     restoreTitle :    'Klikněte pro zavření obrázku, klikněte a táhněte pro jeho přesunutí. Použijte šipky na klávesnici pro přesun na další a předchozí.'
  };
  
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
    slideshowGroup: '3', 
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});


  function showChart(objectId) {
  
    
    
    if (document.getElementById(objectId).style.display == 'block') {
    
     document.getElementById('control'+objectId).innerHTML = '&gt;&gt;';
     document.getElementById(objectId).style.display = 'none';
    
    } else {
    
     document.getElementById('control'+objectId).innerHTML  = '&lt;&lt;';
     document.getElementById(objectId).style.display = 'block';
    
    }
    
  }
  
  
  function pageScroll() {
  
      	window.scrollBy(0,-100);
    
  }
    
  if (document.URL.match('(.*)\#(.*)')) {
    window.onload = pageScroll;
  }
  
  var hash = window.location.hash;
  
  setInterval(function() {
      if (hash != window.location.hash) {
          pageScroll();
          hash = window.location.hash;
      }
  }, 1000);
  
  
 
  var rowHeight = 29;
  var timeout = 10; 
  //var tm = rowHeight;
  var tm = 0;
  var how = 0;
  var dimQ = 0;
  var tmr = timeout;
  
  function RollBarCoolBar(how) {
  
     how = how+0;
     document.getElementById('smworks-scroll').style.margin = ''+how+'px 0 0 0';
     
  }
  
  function MoveRollbar() {
     RollBarCoolBar(tm); tm--;
  }
  
  
function MainMoveRollBar() {

  interval = setInterval(function() {
        
        if (tm < -((rowsCount-0.2)*rowHeight)) {
          tm=rowHeight; 
          tmr=0;
        } else {
          tmr=timeout;
        }
         
          if (tm%rowHeight == 0) {
              
           clearInterval(interval);
           MoveRollbar();
           setTimeout(MainMoveRollBar, tmr*1000);
          
          } else {
          
            MoveRollbar(); 
          
          }
          
          
      
          
  }, 20);

  
}

function setTopMenu() {

  var myWidth = 0, myHeight = 0;
  
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

  if (myWidth > 1024) {
    
    document.getElementById("top").className  = "fixed";
  
  }  else {

    document.getElementById("top").className  = "";
    
  }
  
}


setTimeout(setTopMenu, 500);

window.onresize = null;
window.onresize = setTopMenu;

function openIntro() {  

}

function closeIntro() {
    document.getElementById("introdiv").style.display = "none"; 

      
}

function startSlider() {
$(function(){
	$('#slides').slides({
		preload: true,
		preloadImage: '',
		play: 5000,
		pause: 2500,
		hoverPause: true
	});
});
}

window.onload = startSlider;
