jQuery.fn.iflip=function(d,c){jQuery(this).click(function(){curr=jQuery(this).find("img").attr("src");if(curr==d){jQuery(this).find("img").attr("src",c)}else{if(curr==c){jQuery(this).find("img").attr("src",d)}}})};function genQ(a,b,d,f){f=typeof(f)!="undefined"?f:"false";var e="";if(jQuery.browser.safari){e+='<video width="'+b+'" height="'+d+'" controls="'+f+'" autoplay="true" bgcolor="black" scale="aspect" postdomevents="true" src="'+a+'" tabindex="0">'}e+='<object width="'+b+'" height="'+d+'" id="quicktimevideo" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B">';e+='<param value="'+a+'" name="src"/>';e+='<param value="'+f+'" name="controller"/>';e+='<param value="myself" name="target"/>';e+='<param value="video/quicktime" name="type"/>';e+='<param value="transparent" name="WMODE"/>';e+='<embed src="'+a+'" width="'+b+'" height="'+d+'" showlogo="true" type="video/quicktime" target="myself" autoplay="true" loop="true" controller="'+f+'" pluginspage="http://www.apple.com/quicktime/download/">';e+="</object>";if(jQuery.browser.safari){e+="</video>"}return e}function lQ(b,a){b.find("img").hide();b.prepend(genQ(a,pW,pH))}function lUTube(f,c,b){f.find("img").hide();var d=c;var a=d.match(/v=([^&]+)/);var e=a[1];f.find("img").hide();var g={allowScriptAccess:"always"};f.prepend('<div id="utube'+b+'"></div>');swfobject.embedSWF("http://www.youtube.com/v/"+e+"&enablejsapi=1&playerapiid=ytplayer","utube"+b,pW,pH,"8",null,null,g,null)}function loadImage(e,k,c){var h=jQuery("#poster"+e);var f=jQuery("#gallery"+e);var j=jQuery("#description"+e);var b=jQuery("#abstract"+e);h.find("a").attr("href",cP+iD+k+fS);h.find("img").attr("src",cP+iD+k+pS);jQuery.ajax({type:"GET",async:false,cache:false,dataType:"json",data:{imageId:k},url:iU,success:function(a){h.find("#quicktimevideo").remove();h.find("img").show();b.html(a.text);if(a.mediaurl.length>0){h.find("a").attr("href","#");if(a.mediaurl.toLowerCase().indexOf(".mov")>-1){lQ(h,a.mediaurl)}else{if(a.mediaurl.toLowerCase().indexOf("youtube")>-1){lUTube(h,a.mediaurl,e)}}}}});if(c){b.addClass("abstractLandscape");j.addClass("descriptionLandscape");f.addClass("galleryLandscape");h.addClass("posterLandscape")}else{b.removeClass("abstractLandscape");j.removeClass("descriptionLandscape");f.removeClass("galleryLandscape");h.removeClass("posterLandscape")}}function loadWeatherData(a,b){jQuery.ajax({type:"GET",async:true,cache:false,dataType:"xml",url:cP+"/weather/"+a+".xml",success:function(e){var c=jQuery.xmlToJSON(e);jQuery(b).html(c.channel[0].item[0].condition[0].temp+"&#176;C")}})}jQuery(document).ready(function(){if(cId){jQuery('div#categories a[href*="categoryId='+cId+'"]').attr("class","fat")}if(fId){jQuery('div#filter a[href*="filterId='+fId+'"]').attr("class","fat")}if(l){jQuery('div#i8n a[href*="request_locale='+l+'"]').attr("class","fat")}if(jQuery.browser.safari){jQuery(".sform").html('<span class="left"></span><input name="q" type="text" class="middle" accesskey="s" tabindex="0" value="'+q+'" style="-webkit-appearance: none;-webkit-background-clip: border;-webkit-background-origin: padding;-webkit-rtl-ordering: logical;-webkit-user-select: text;outline-style: auto;outline-width: 0px" /><span class="right"></span>')}else{jQuery(".sform").html('<span class="left"></span><input name="q" type="text" class="middle" accesskey="s" tabindex="0" value="'+q+'" /><span class="right"></span>')}jQuery(".lightbox").lightbox();loadWeatherData("GMXX0040","#wffm");loadWeatherData("GMXX1273","#wberlin")});