(function(r){var s=function(g,h){var i=this;var j={dataUrl:'http://www.outdoorchannel.de/php/widget/data.php',jqueryUrl:'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js',channel:g||'odc',limit:h||5,elemId:'odc-widget',hideHeader:false,disableStyling:false,bgColor:null,linkColor:null,padding:0,outputMode:'list',width:null,height:null};var k={odc:{headline:'Aktuelle News vom outdoorCHANNEL',channelName:'outdoorCHANNEL',channelUrl:'http://www.outdoorchannel.de/',custnum:'3764'},mb:{headline:'Aktuelle News rund ums Mountainbike',channelName:'MountainBIKE Magazin',channelUrl:'http://www.mountainbike-magazin.de/',custnum:'3765'},rb:{headline:'Aktuelle News rund ums Rennrad',channelName:'RoadBIKE',channelUrl:'http://www.roadbike.de/',custnum:'3780'},ub:{headline:'Aktuelle News rund um E-Bikes',channelName:'ElektroBIKE',channelUrl:'http://www.elektrobike-online.com/',custnum:'d9841745e4710d47'},kle:{headline:'Aktuelle News rund ums Klettern',channelName:'klettern',channelUrl:'http://www.klettern.de/',custnum:'3770'},psnow:{headline:'Aktuelle News rund ums Skifahren',channelName:'planetSNOW',channelUrl:'http://www.planetsnow.de/',custnum:'3767'},cav:{headline:'Aktuelle News rund ums Reiten',channelName:'CAVALLO',channelUrl:'http://www.cavallo.de/',custnum:'3781'},od:{headline:'News zu allem was draußen Spaß macht',channelName:'outdoor Magazin',channelUrl:'http://www.outdoor-magazin.com/',custnum:'3766'}};this.render=function(a,b,c){if(b){j.width=b}if(c){j.height=c}if(a){j.elemId=a}if('undefined'==typeof jQuery){var d=document.getElementsByTagName("head")[0];var e=document.createElement('script');e.type='text/javascript';e.src=j.jqueryUrl;e.onload=e.onreadystatechange=function(){l()};d.appendChild(e)}else{l()}if(typeof wm_indiv_stats=='undefined'){var d=document.getElementsByTagName("head")[0];var f=document.createElement('script');f.type='text/javascript';f.src='http://'+g+'.motorpresse-statistik.de/track/count.js';f.onload=f.onreadystatechange=function(){q()};d.appendChild(f)}else{q()}};this.setColors=function(a,b){if(a){j.bgColor=a}if(b){j.linkColor=b}return this};this.setPadding=function(a){if(a){j.padding=a}return this};this.setOutputMode=function(a){if(a&&('list'==a||'paragraphs'==a)){j.outputMode=a}return this};this.hideHeader=function(a){if('boolean'===typeof a){j.hideHeader=a}return this};this.disableStyling=function(a){if('boolean'===typeof a){j.disableStyling=a}return this};var l=function(){jQuery.ajax({url:o(),dataType:'jsonp',cache:true,success:function(a){m(a)}})};var m=function(c){jQuery('#'+j.elemId).empty();if(!j.hideHeader){jQuery('#'+j.elemId).append('<div class="odc-widget-headline">'+p('headline')+'</div>')}if('list'==j.outputMode){jQuery('#'+j.elemId).append('<ul class="odc-widget-list"></ul>')}jQuery.each(c,function(a,b){if('list'==j.outputMode){jQuery('#'+j.elemId+' ul').append('<li><a href="'+b.url+'" target="_blank">'+b.headline+'</a></li>')}else{jQuery('#'+j.elemId).append('<p><a href="'+b.url+'" target="_blank">'+b.headline+'</a></p>')}});jQuery('#'+j.elemId).append('<div class="odc-widget-footer">Powered by <a href="'+p('channelUrl')+'" target="_blank">'+p('channelName')+'</a></div>');if(!j.disableStyling){n()}};var n=function(){jQuery('#'+j.elemId).css({font:'12px Arial,Verdana,Tahoma,sans-serif',overflow:'auto',padding:j.padding+'px'});jQuery('#'+j.elemId+' .odc-widget-headline').css({margin:'0 0 8px 0',padding:0});if('list'==j.outputMode){jQuery('#'+j.elemId+' .odc-widget-list').css({margin:0,padding:0});jQuery('#'+j.elemId+' .odc-widget-list li').css({listStyle:'square',margin:'5px 0 5px 20px',padding:0})}else{jQuery('#'+j.elemId+' p').css({margin:'5px 0',padding:0})}jQuery('#'+j.elemId+' .odc-widget-footer').css({margin:'8px 0 0 0',padding:0});if(j.bgColor){jQuery('#'+j.elemId).css('backgroundColor',j.bgColor)}if(j.linkColor){jQuery('#'+j.elemId+' a').css('color',j.linkColor)}var a='auto';if(j.width){if('number'==typeof j.width||j.width.match(/^\d+$/)){a=j.width+'px'}else{a=j.width}}jQuery('#'+j.elemId).css('width',a);var b='auto';if(j.height){if('number'==typeof j.height||j.height.match(/^\d+$/)){b=j.height+'px'}else{b=j.height}}jQuery('#'+j.elemId).css('height',b)};var o=function(){return j.dataUrl+'?channel='+j.channel+'&limit='+j.limit};var p=function(a){if(a&&'string'==typeof k[j.channel][a]){return k[g][a]}return''};var q=function(){if(typeof flag_wm=='undefined'){flag_wm=false}if(flag_wm!=true){flag_wm=true;var a=document.URL.replace(/^http:\/\//,'');wm_custnum=k[g].custnum;wm_campaign_key='odckampagne';try{wiredminds.use_image_container=true;wiredminds.trackEvent('widget/'+g+'/'+a)}catch(e){}}}};r.OdcWidget=s})(window);
