// IE8 fix var box = jQuery('#mf_cookie_box'); if (textShort !== '' && text !== '') { var content = ''; if (box.length === 0) { jQuery('body').append(content); } else { box.replaceWith(content); } jQuery('#mf_close_cookie').unbind('click').click(function() { jQuery('#mf_cookie_box').remove(); mfCookie.create('cookie_box', 0, 365); }); jQuery('#mf_cookie_txt').hover(function() { jQuery('#mf_cookie_txt').html(text); }, function() { jQuery('#mf_cookie_txt').html(textShort); }); } else { //for AJAX switching through languages box.remove(); } }); } } var mfSlideShow = { slides: '#sidebar_slideshow .slide', active: 0, timer: '', init: function() { if (this.timer === '') { this.active = this.randomize(); jQuery(this.slides+':eq('+this.active+')').addClass('active').css('opacity', '1'); mfSlideShow.slide(); } }, randomize: function() { var quantity = jQuery(this.slides).length; return Math.floor(Math.random()*quantity); }, slide: function() { var quantity = jQuery(this.slides).length; if (quantity > 0) { var current = jQuery(this.slides+':eq('+this.active+')'); this.active = (this.active + 1 < quantity) ? this.active + 1 : 0; var next = jQuery(this.slides+':eq('+this.active+')'); current.removeClass('active'); next.addClass('active').animate({opacity: 1.0}, 1000).css('zIndex','2'); current.animate({opacity: 0}, 1000).css('zIndex','1'); this.timer = setTimeout('mfSlideShow.slide()', 5000); } else { clearTimeout(this.timer); this.timer = ''; } } } var mfAppendMultiThumb = function(id) { jQuery('.microthumb','#' + id).click(function() { var self = jQuery(this); var content = self.parents().filter('.multithumb'); jQuery('.microthumb_wrapper', content).removeClass('current'); self.parent().addClass('current'); var fullPath = jQuery('img',self).attr('src'); fullPath = fullPath.split('thumb200_'); path = fullPath[0] + 'thumb_' + fullPath[1]; fullPath = fullPath.join(''); jQuery('.fullthumb > a', content).attr('href',fullPath).css({'background': 'url('+path+') no-repeat center center'});; self.blur(); return false; }); } var mfInlineGallery = function(id, sign) { var scrollValue = parseInt(sign + 200, 10); var wrapper = jQuery('#' + id + ' .inlinegallery_content'); var currentScroll = wrapper.scrollLeft(); var maxScroll = jQuery('#' + id + ' .inlinegallery_wrapper').width() - wrapper.width(); var newScroll = currentScroll + scrollValue; if (newScroll > maxScroll) { newScroll = maxScroll; } else if (newScroll < 0) { newScroll = 0; } wrapper.animate({scrollLeft : newScroll}, 500); } // ]]>