/* === modules/header/js/header.js (23.05.2011 22:25:51) === */
$(window).ready(function() {
  if ($('#header-pictures > img').length > 1) {
    $('#header-pictures').after('<div id="pictures-nav">').cycle({
     // pager: '#pictures-nav'
    }).hover(function() {
      $(this).cycle('pause')
    }, function() {
      $(this).cycle('resume');
    });
  }

});
/* === modules/news/js/news.js (25.05.2011 20:55:23) === */
$(function() {
  $('div.news-list div.entries').cmsplus_pagenize({
    pagesize:4,
    language: cmsplus.language
  });
});
/* === modules/news/js/header.js (23.05.2011 08:16:55) === */
$(document).ready(function() {
  $('.newsticker').vTicker({
    speed: 500,
    pause: 3000,
    showItems: 5,
    animation: 'fade',
    mousePause: false,
    height: 0,
    direction: 'up'
  });
});
/* === modules/menu/js/sidebar.js (19.05.2011 16:23:37) === */
$(document).ready(function() {
  /* menu border fix */
  $('div.menu-sidebar ul li:last > div > a, div.menu-sidebar > ul > li.active:not(:has(ul)) > div > a').css({'border':'0'});
});
/* === modules/editor/js/editor.js (02.05.2011 11:35:34) === */
$(document).ready(function() {
 //  $('div.editor img').boxShadow(0,0,4,'#ccc');
   if ($.flash.available) {
     $('div.editor img[data-video]').each(function() {
       var image = $(this);
       var target = image;
       if (image.parent().is('a')) {
         target = image.parent();
       }
       var w = image.width(), h = image.height();
       target.wrap('<div class="video '+image.attr('class')+'" style="width:'+w+'px; height:'+h+'px; background:url('+image.attr('src')+') no-repeat center;"></div>');
       target = target.parent();
       $(target).empty();
       var flashvars = {};
       flashvars.language = cmsplus.language;
       flashvars.mediaURL = image.attr('data-video');
       flashvars.teaserURL = image.src;
       flashvars.allowSmoothing = "true";
       flashvars.autoPlay = image.attr('data-autoplay');
       if (!flashvars.autoPlay) flashvars.autoPlay = 'false';
       flashvars.buffer = "6";
       flashvars.showTimecode = "true";
       flashvars.loop = image.attr('data-loop'); //data-loop
       if (!flashvars.loop) flashvars.loop = 'false';
       flashvars.controlColor = "0x541e1c";
       flashvars.controlBackColor = "0xFFFFFF";
       flashvars.controlBackAlpha = "1";
       flashvars.scaleIfFullScreen = "true";
       flashvars.showScalingButton = "false";
       flashvars.defaultVolume = image.attr('data-volume');
       if (typeof flashvars.defaultVolume == 'undefined') {
         flashvars.defaultVolume = "0";
       }
       flashvars.crop = "false";
       $(target).flash({
         swf: '/common/flash/video/player.swf',
         width: w,
         height: h,
         allowFullScreen: true,
         wmode: 'transparent',
         scale: 'noscale',
         flashvars: flashvars
       });

     });

   }

});
