
$(function () {
            document.getElementById('prev').title = "#cont01";
            document.getElementById('next').title = "#cont02";
            
            document.getElementById('prev').href = "#cont01";
            document.getElementById('next').href = "#cont02";
            
            
			var tabContainers = $('div#tabs > div');
			tabContainers.hide().filter(':first').show();
			
			$('div#tabs ul a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('div#tabs ul a').removeClass('active');
				$(this).addClass('active');
				
				var div;
				var next;
				var prev;
				
				div = this.hash;
				
				next = '#cont02';
                prev = '#cont01';
				
                				
				return false;
			}).filter(':first').click();
			
			$('div#tabs ul a.link').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
                window.location.href = 'http://www.inspiro-solutions.cz/cs/Firemni-webove-stranky-37.htm';
			
				
				return false;
			})
			
			$('div#tabs ul a.prev').click(function () {
			    var prev = document.getElementById('prev').title;
			    
			    if(prev == '#cont01')
				{
                    vnext = '#cont02';
                    vprev = '#cont01';
                }
                
                if(prev == '#cont02')
				{
                    vnext = '#cont03';
                    vprev = '#cont01';
                }
                
                if(prev == '#cont03')
				{
                    vnext = '#cont04';
                    vprev = '#cont02';
                }
                
                if(prev == '#cont04')
				{
                    vnext = '#cont05';
                    vprev = '#cont03';
                }
                
                if(prev == '#cont05')
				{
                    vnext = '#cont05';
                    vprev = '#cont04';
                }
                
                document.getElementById('next').title = vnext;
                document.getElementById('prev').title = vprev;   
                
                document.getElementById('next').href = vnext;
                document.getElementById('prev').href = vprev;
                
			    
			    tabContainers.hide();				
				var tmp = prev.substring(1, prev.length);
				document.getElementById(tmp).style.display = "block";
				
				$('div#tabs ul a').removeClass('active');
				$('div#tabs ul a[href='+ prev +']').addClass('active');
				
				return false;
			})
			
			
			$('div#tabs ul a.next').click(function (nextc, prevc) {			    
			    var next = document.getElementById('next').title;
			    
			    if(next == '#cont01')
				{
                    vnext = '#cont02';
                    vprev = '#cont01';
                }
                
                if(next == '#cont02')
				{
                    vnext = '#cont03';
                    vprev = '#cont01';
                }
                
                if(next == '#cont03')
				{
                    vnext = '#cont04';
                    vprev = '#cont02';
                }
                
                if(next == '#cont04')
				{
                    vnext = '#cont05';
                    vprev = '#cont03';
                }
                
                if(next == '#cont05')
				{
                    vnext = '#cont05';
                    vprev = '#cont04';
                }
                
                document.getElementById('next').title = vnext;
                document.getElementById('prev').title = vprev;   
                
			   
			    tabContainers.hide();				
				var tmp = next.substring(1, next.length);
				document.getElementById(tmp).style.display = "block";
				
				$('div#tabs ul a').removeClass('active');
				$('div#tabs ul a[href='+ next +']').addClass('active');
				
				return false;
			})
			
		});