jQuery(function(){jQuery('a[rel~="external"]').click(function($e){$e.preventDefault();window.open(this.href,'_blank');});});jQuery(function(){function nextNews(){var curr=$('#newsTickerItems div.active');var next=$('#newsTickerItems div.active').next();var last=$('#newsTickerItems div:last[style="active"]');curr.removeClass('active').hide();if(next.length==0){$('#newsTickerItems div:first').addClass('active').fadeIn('slow').show();} else{next.addClass('active').fadeIn('slow').show();}} function prevNews(){var curr=$('#newsTickerItems div.active');var prev=$('#newsTickerItems div.active').prev();curr.removeClass('active').hide();if(prev.length==0){$('#newsTickerItems div:last').addClass('active').fadeIn('slow').show();} else{prev.addClass('active').fadeIn('slow').show();}} $('#newsTickerItems div:first').addClass('active').show();$('#newsTickerLeft a').click(function(){prevNews();return false;});$('#newsTickerRight a').click(function(){nextNews();return false;});});jQuery(function(){function nextBlog(){var curr=$('#blogTickerItems div.active');var next=$('#blogTickerItems div.active').next();var last=$('#blogTickerItems div:last[style="active"]');curr.removeClass('active').hide();if(next.length==0){$('#blogTickerItems div:first').addClass('active').fadeIn('slow').show();} else{next.addClass('active').fadeIn('slow').show();}} function prevBlog(){var curr=$('#blogTickerItems div.active');var prev=$('#blogTickerItems div.active').prev();curr.removeClass('active').hide();if(prev.length==0){$('#blogTickerItems div:last').addClass('active').fadeIn('slow').show();} else{prev.addClass('active').fadeIn('slow').show();}} $('#blogTickerItems div:first').addClass('active').show();$('#blogTickerLeft a').click(function(){prevBlog();return false;});$('#blogTickerRight a').click(function(){nextBlog();return false;});});jQuery(function(){var $quicklinks=jQuery('#quicklinks');if($quicklinks.length){var $catalogue=$quicklinks.find('.catalogue');var $prev=jQuery('
').addClass('prev');var $next=jQuery('').addClass('next');var item_width=parseInt($catalogue.find('.product').css('width'));var catalogue_width=parseInt($catalogue.css('width'));var $wrapper=jQuery('').css({'width':catalogue_width+'px','height':'100%','overflow':'hidden','float':'left','position':'relative'});var update_buttons=function(){var left_pos=parseInt($catalogue.css('left'),10);if(left_pos+$catalogue.width()>catalogue_width){$next.removeClass('disabled');}else{$next.addClass('disabled');} if(left_pos<0){$prev.removeClass('disabled');}else{$prev.addClass('disabled');}};$catalogue.css({'height':'100%','position':'relative','left':'0'});$catalogue.wrap($wrapper);$catalogue.width(parseInt($catalogue.children('div').length)*item_width+'px');$next.click(function(){var left_pos=parseInt($catalogue.css('left'),10);if(left_pos+$catalogue.width()>catalogue_width){$catalogue.animate({'left':left_pos-catalogue_width+'px'},800,function(){update_buttons();});}});$prev.click(function(){var left_pos=parseInt($catalogue.css('left'),10);if(left_pos<0){$catalogue.animate({'left':left_pos+catalogue_width+'px'},800,function(){update_buttons();});}});$quicklinks.prepend($prev);$quicklinks.append($next);$quicklinks.width($quicklinks.width()+$prev.width()+$next.width()+'px');update_buttons();}});