window.addEvent("domready", function(){

          /* xbox */
          
var x_box = new XBox(); 

          /* form-validation */

var form_validation = new FormValidation({
    parent_class_error : false,
    error_class : "error"
  });

          /* targetblanks */

$$("a.targetblank").addEvent("click", function(event){
  if(typeof window.open(this.href)=="object"){
    event.stop();
  }
});

          /* tabz */

if($("cewe_naviz")){
  $("cewe_naviz").getElements("a").each(function(naviz){
    naviz.addEvent("click", function(){
      $$(".cewe_content").removeClass("act");
      $(this.getParent().id + "_content").addClass("act");
      $$("#cewe_naviz a").removeClass("act");      
      this.addClass("act");
      this.blur();
      return false;
    });
  });
}

if($("cewe_tips")){
  $("cewe_tips").getElements("a").each(function(naviz){
    naviz.addEvent("click", function(){
      $$(".cewe_tips_content").removeClass("act");
      $(this.getParent().id + "_content").addClass("act");
      $$("#cewe_tips a").removeClass("act");      
      this.addClass("act");
      this.blur();
      return false;
    });
  });
}

if($$(".flowplayer_video").length > 0){
  $$(".flowplayer_video").each(function(video, index){
    var video_id = video.getElement("a").id;
    if(video_id != ""){
      flowplayer(video_id, "/common/js/flowplayer-3.2.5.swf", {
        clip: {
      		autoPlay: false, 
		      autoBuffering: true
        }
      });       
    }
  });
}

if($("video_stanislav_sykora")){
  flowplayer("video_stanislav_sykora", "/common/js/flowplayer-3.2.5.swf");
}


if($("youtube_player")){
  $$(".video_list .video a, .video_list .video").addEvent("click", function(){
    if(this.hasClass("more")){
      var youtube_link = this.href;
    } else {
      var youtube_link = this.getElement("a.more").href;
    }
    $("youtube_player").src=youtube_link;
    window.scroll(0,280);
    return false;
  });
}

var newsletter_value = "Emailova adresa";

if($("newsletter_register_mail")){
  if($("newsletter_register_mail").value == ""){
    $("newsletter_register_mail").value = newsletter_value;
  }
  $("newsletter_register_mail")
    .addEvent("click", function(){
      if($("newsletter_register_mail").value == newsletter_value){
        $("newsletter_register_mail").value = "";
      }    
    })
    .addEvent("blur", function(){
      if($("newsletter_register_mail").value == ""){
        $("newsletter_register_mail").value = newsletter_value;
      }    
  });  
}

        /* Cufon */

if (Cufon && Cufon.replace) {
	Cufon.replace('#hp_sw_box_2 h2, #offer_box_2 h2, #offer_box_2 .price, #rcol_sw_box_2 h2, #rcol #banner_edu h2, #rcol #banner_gallery h2, #newsletter_register_form_rcol h2', {hover: true});
}

        /* sklik */

if($$(".sklik").length > 0){
  
  var sklik_iframe = new Element("iframe", {
    "id" : "sklik_iframe",
    "width" : 1,
    "height" : 1,
    "frameborder" : 0,
    "scrolling" : "no",
    "src" : ""
  }); 
  sklik_iframe.inject(document.body);
  
  $$(".sklik").addEvent("click", function(){
    var sklik_url = "http://out.sklik.cz/conversion?c=" + this.rel + "&color=ffffff&v=";
    if($("sklik_iframe")){
      $("sklik_iframe").src = sklik_url;
    }
    var download_link = this.href;
    (function() {
      window.location.href = download_link;
    }).delay(1000);
    return false;
  });
}

        /* Podekovani redirect */

if($('win1')){
  $('win1').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotolab';
    }).delay(2000);
  });
}
if($('win2')){
  $('win2').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotostar';
    }).delay(2000);
  });
}
if($('win3')){
  $('win3').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?dm';
    }).delay(2000);
  });
}
if($('win4')){
  $('win4').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?schlecker';
    }).delay(2000);
  });
}
if($('win5')){
  $('win5').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?teta';
    }).delay(2000);
  });
}
if($('win6')){
  $('win6').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?globus';
    }).delay(2000);
  });
}
if($('win7')){
  $('win7').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?makro';
    }).delay(2000);
  });
}
if($('win8')){
  $('win8').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotovideo';
    }).delay(2000);
  });
}
if($('win9')){
  $('win9').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?miton';
    }).delay(2000);
  });
}
if($('win10')){
  $('win10').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotolab';
    }).delay(2000);
  });
}
if($('win11')){
  $('win11').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotolab';
    }).delay(2000);
  });
}
if($('win12')){
  $('win12').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?globus';
    }).delay(2000);
  });
}
if($('win13')){
  $('win13').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?schlecker';
    }).delay(2000);
  });
}
if($('win14')){
  $('win14').addEvent('click', function(event){
    (function() {                                                                                  
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?dm';
    }).delay(2000);
  });
}
if($('win15')){
  $('win15').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-windows.html?fotostar';
    }).delay(2000);
  });
}




if($('mac1')){
  $('mac1').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotolab';
    }).delay(2000);
  });
}
if($('mac2')){
  $('mac2').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotostar';
    }).delay(2000);
  });
}
if($('mac3')){
  $('mac3').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?dm';
    }).delay(2000);
  });
}
if($('mac4')){
  $('mac4').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?schlecker';
    }).delay(2000);
  });
}
if($('mac5')){
  $('mac5').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?teta';
    }).delay(2000);
  });
}
if($('mac6')){
  $('mac6').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?globus';
    }).delay(2000);
  });
}
if($('mac7')){
  $('mac7').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?makro';
    }).delay(2000);
  });
}
if($('mac8')){
  $('mac8').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotovideo';
    }).delay(2000);
  });
}
if($('mac9')){
  $('mac9').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?miton';
    }).delay(2000);
  });
}
if($('mac10')){
  $('mac10').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotolab';
    }).delay(2000);
  });
}
if($('mac11')){
  $('mac11').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotolab';
    }).delay(2000);
  });
}
if($('mac12')){
  $('mac12').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?globus';
    }).delay(2000);
  });
}
if($('mac13')){
  $('mac13').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?schlecker';
    }).delay(2000);
  });
}
if($('mac14')){
  $('mac14').addEvent('click', function(event){
    (function() {                                                                                  
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?dm';
    }).delay(2000);
  });
}
if($('mac15')){
  $('mac15').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-mac.html?fotostar';
    }).delay(2000);
  });
}




if($('lin1')){
  $('lin1').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotolab';
    }).delay(2000);
  });
}
if($('lin2')){
  $('lin2').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotostar';
    }).delay(2000);
  });
}
if($('lin3')){
  $('lin3').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?dm';
    }).delay(2000);
  });
}
if($('lin4')){
  $('lin4').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?schlecker';
    }).delay(2000);
  });
}
if($('lin5')){
  $('lin5').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?teta';
    }).delay(2000);
  });
}
if($('lin6')){
  $('lin6').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?globus';
    }).delay(2000);
  });
}
if($('lin7')){
  $('lin7').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?makro';
    }).delay(2000);
  });
}
if($('lin8')){
  $('lin8').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotovideo';
    }).delay(2000);
  });
}
if($('lin9')){
  $('lin9').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?miton';
    }).delay(2000);
  });
}
if($('lin10')){
  $('lin10').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotolab';
    }).delay(2000);
  });
}
if($('lin11')){
  $('lin11').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotolab';
    }).delay(2000);
  });
}
if($('lin12')){
  $('lin12').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?globus';
    }).delay(2000);
  });
}
if($('lin13')){
  $('lin13').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?schlecker';
    }).delay(2000);
  });
}
if($('lin14')){
  $('lin14').addEvent('click', function(event){
    (function() {                                                                                  
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?dm';
    }).delay(2000);
  });
}
if($('lin15')){
  $('lin15').addEvent('click', function(event){
    (function() {
      window.location.href = 'http://www.cewe-fotokniha.cz/stahnout-program-podekovani-linux.html?fotostar';
    }).delay(2000);
  });
}


				/* layer_right_widget */

if($("layer_right_widget")){
	$("layer_right_widget").addEvent("mouseenter", function(){
		if(!$("layer_right_widget").hasClass("act")){
			$("layer_right_widget").tween("width", 249);
			$("layer_right_widget").addClass("act")
		}
	});
	$("layer_right_widget").addEvent("mouseleave", function(){
		if($("layer_right_widget").hasClass("act")){
			$("layer_right_widget").tween("width", 32);
			$("layer_right_widget").removeClass("act")
		}
	});
}

				/* layer_left_widget */

if($("layer_left_widget")){
	$("layer_left_widget").addEvent("mouseenter", function(){
		if(!$("layer_left_widget").hasClass("act")){
			$("layer_left_widget").tween("width", 230);
			$("layer_left_widget").addClass("act")
		}
	});
	$("layer_left_widget").addEvent("mouseleave", function(){
		if($("layer_left_widget").hasClass("act")){
			$("layer_left_widget").tween("width", 32);
			$("layer_left_widget").removeClass("act")
		}
	});
}


});










