// Skin Specific JS goes here. The jQuery library has already been loaded by the core templates. So if you use jQuery, you are ready to go.

(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)

jQuery.preLoadImages("header.png", "fileadmin/templates/images/header.png");


jQuery(document).ready(function() {



// comments
//$("#c211").hide();
//$("#guestbooktoggle").click(function () {
//$("#c211").toggle('slow');
});
$("ul.submenu").hide();
$('#globalMenu li').hover(
      function () {
        $(this).find(".submenu").show();
      },
      function(){	
    	  $(this).find(".submenu").hide(); 
    	});
    	
    	$('#newscarousel').jcarousel({
        scroll:1,
        vertical: true,
        auto: 3,
        animation: 2500,
        easing: 'swing',
        wrap: 'circular'
      });

$('#rightblock ul').removeAttr("id");

      // Gallery Setup for JCarousel & Colorbox
      var total = $('.csc-textpic-imagewrap ul li').size();
      alert(total);
      if(total > 1) {
        $('.csc-textpic-imagewrap').addClass('jcarousel jcarousel-skin-tango');
        $('.csc-textpic-imagewrap').jcarousel({
          scroll:1,
          auto: 1,
          animation: 3500,
          easing: 'swing',
          wrap: 'circular'
        });
      }
      $('.jcarousel-container').hover(
     	 function () {
     	   $(this).find(".jcarousel-prev").show('slow');
     	   $(this).find(".jcarousel-next").show('slow');
     	 },
     	 function(){		  
      	  $(this).find(".jcarousel-prev").hide('slow');
      	  $(this).find(".jcarousel-next").hide('slow'); 
    });
    
    $('.jcarousel-prev').hide();
    $('.jcarousel-next').hide();

});


