
$hehe = jQuery.noConflict();


$hehe(document).ready(function(){    
    
    $hehe("#showit").click(function () {
      if ($hehe("#rollit:first").is(":hidden")) {
        $hehe("#rollit").slideDown("slow");
      } else {
         $hehe("#rollit").slideUp("slow");
      }
    });
    
    $hehe("#top").click(function () {
        window.location.href = 'http://www.olire.cz';
        return false;
    });
    
    $hehe('#top').hover(function() {
      $hehe(this).css('cursor','pointer');
      }, function() {
      $hehe(this).css('cursor','auto');
    });
    

// Set starting slide to 1
		var startSlide = 1;
		// Get slide number if it exists
		if (window.location.hash) {
			startSlide = window.location.hash.replace('#','');
		}
		// Initialize Slides
		$hehe('#slides').slides({
			preload: true,
			preloadImage: 'images/loading.gif',
			generatePagination: true,
			play: 3000,
			pause: 1000,
			hoverPause: true,
			// Get the starting slide
			start: startSlide,
			animationComplete: function(current){
				// Set the slide number as a hash
				window.location.hash = '#' + current;
			}
		});
    
    $hehe("a.action_print").click(function () {
			var win = window.open('', 'Image', 'resizable=yes,...');
			if (win.document) {
				win.document.writeln('<img src="'+ $hehe(this).attr('href') +'" alt="image" />');
				win.document.close();
				win.focus();
				win.print();
			}

			return false;
    });		

});



