var F=window.F||{};(function(){var at=(navigator.userAgent.match(/WebKit/i));var ai=20,aa=0,aE=1*60*1000,L=100,H=true,aA=false,N=true,aR=true,i="XMLHttpRequest",ac="X-Flickr-Ref",a="X-Flickr-NoLog",aN=4,D="sp";var aw=null,ay=null,f=0,Z=0,aQ=1,V=location.hash,J="#/",A=[],Q=0,aH,ak,aJ=[],I={},P={},af,aY=false,aD={x:null,y:null},q=null,ah=false,X=false,aP=true,c=false,ab=(at&&aR&&aA)?ae:(aA?am:an),K=(at&&aR&&N)?aI:(N?R:b),w=false,U,o,k,ag=false,s=null,aM=false,C=false,aO,Y=false,T,ad=0,m=false;var al=true,r=true;var x="_QM_",aG="_AND_",O="_IS_",aq="+";var G=31556926000;var aV={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};function e(a0){return String(a0).replace(/[&<>"'\/]/g,function(a1){return aV[a1]})}function h(){if(m){return false}var a0=document.body,a2=document.getElementById("logo-link"),a1=document.createElement("span"),a5=document.getElementById("nav"),a3=document.getElementById("ios-logout"),a4;m=true;if(a2){a2.parentNode.insertBefore(a1,a2);a2.id="";a2.parentNode.removeChild(a2);a1.id="logo-link"}if(a5){a5.style.display="none"}if(a0){a4=a0.className?a0.className.split(" "):[];a4.push("no-footer-links");a0.className=a4.join(" ")}if(a3){a3.style.display="block"}}if(F.showing_app_interstitial){window.onorientationchange=function(){interstitial.style.width=0;interstitial.style.height=document.height+"px";interstitial.style.width=document.width+"px";var a0=(window.orientation==90||window.orientation==-90)?"landscape":"portrait";document.getElementById("app-interstitial").className=document.getElementById("app-interstitial").className.replace(/portrait|landscape/,a0)}}function aC(){if(navigator.cookieEnabled){if(!window.location.href.match(/signup|auth/i)){if(navigator.userAgent.match(/(iPhone|iPod)/i)&&navigator.userAgent.match(/OS [45](_\d)+/i)){var a4=document.cookie.match(/flaidis\=([0-9]+)*/);if(!a4){var a2=document.createElement("link");a2.setAttribute("rel","stylesheet");a2.setAttribute("type","text/css");a2.setAttribute("href","/css/mobile_iphone_app_interstitial.css?"+Date.now());document.getElementsByTagName("head")[0].appendChild(a2);var a1=(window.orientation==90||window.orientation==-90)?"landscape":"portrait";var a0=(screen.height===568)?"iphone5":"iphone4";var a3="<div class='content'>";a3+="<div class='graphic'><p>"+F.iphone.format_strs.app_is_here.replace(/^([^\s]+)(\.|\!|\。)/gi,"$1$2<br />").replace('<img class="logo" alt="Flickr" src="/images/flickr-logo-inline.png"/>',"<span>flickr</span>")+"</p><div class='balls'></div></div>";a3+="<div class='download'><a>"+F.iphone.format_strs.get_the_app+"</a></div>";a3+="<div class='dismiss'><a>&nbsp;</a></div>";a3+="</div>";interstitial=document.createElement("div");interstitial.setAttribute("id","app-interstitial");interstitial.setAttribute("class",a0+" "+a1);interstitial.style.height=document.height+"px";interstitial.style.width=document.width+"px";interstitial.innerHTML=a3;document.getElementById("header").appendChild(interstitial);F.rapidTrack({section:"app-interstitial",name:"app_promo_interstitial_shown"});document.querySelector(".download a").addEventListener("click",function(a5){a5.preventDefault();F.rapidTrack({section:"app-interstitial",name:"app_promo_interstitial_download"});document.cookie="flaidis=1; expires=Tuesday, 19-Jan-2038 00:00:01 GMT; path=/; domain=.flickr.com";document.getElementById("header").removeChild(interstitial);setTimeout(function(){window.location="https://itunes.apple.com/app/id328407587"},250)},false);document.querySelector(".dismiss a").addEventListener("click",function(a6){a6.preventDefault();var a5=document.cookie.match(/flaidisn\=([0-9]+)*/);F.rapidTrack({section:"app-interstitial",name:"app_promo_interstitial_dismissed"+((a5)?"_"+(parseInt(a5[1])+1):"")});if(!a5){document.cookie="flaidis=1; expires="+(new Date((new Date()).getTime()+1000*60*60*24*3)).toUTCString()+"; path=/; domain=.flickr.com";document.cookie="flaidisn=1; expires=Tuesday, 19-Jan-2038 03:14:07 GMT; path=/; domain=.flickr.com"}else{if(a5[1]==="1"){document.cookie="flaidis=1; expires="+(new Date((new Date()).getTime()+1000*60*60*24*3)).toUTCString()+"; path=/; domain=.flickr.com";document.cookie="flaidisn=2; expires=Tuesday, 19-Jan-2038 03:14:07 GMT; path=/; domain=.flickr.com"}else{if(a5[1]==="2"){document.cookie="flaidis=1; expires="+(new Date((new Date()).getTime()+1000*60*60*24*7)).toUTCString()+"; path=/; domain=.flickr.com";document.cookie="flaidisn=3; expires=Tuesday, 19-Jan-2038 03:14:07 GMT; path=/; domain=.flickr.com"}else{if(a5[1]==="3"){document.cookie="flaidis=1; expires=Tuesday, 19-Jan-2038 03:14:07 GMT; path=/; domain=.flickr.com"}}}}setTimeout(function(){window.location.reload()},250)},false)}}}}else{F.rapidTrack({section:"app-interstitial",name:"cookies_off"})}}var aW="hidden";if(aW in document){document.addEventListener("visibilitychange",aT)}else{if((aW="mozHidden") in document){document.addEventListener("mozvisibilitychange",aT)}else{if((aW="webkitHidden") in document){document.addEventListener("webkitvisibilitychange",aT)}else{if((aW="msHidden") in document){document.addEventListener("msvisibilitychange",aT)}else{if("onfocusin" in document){document.onfocusin=document.onfocusout=aT}else{window.onpageshow=window.onpagehide=window.onfocus=window.onblur=aT}}}}}function aT(a1){var a2="visible",a3="hidden",a0={focus:a2,focusin:a2,pageshow:a2,blur:a3,focusout:a3,pagehide:a3};a1=a1||window.event;if(a1.type in a0){Y=a0[a1.type]}else{Y=this[aW]}}F.iphone={deepLink:function(a2,a9){var a0,a1=false,a5=false,a4=false,be,bb,a7,bd,ba=false,a3,a6,bc;a6=F.iphone.getCurrentPage();a9=a9||"appbanner";if(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent)){a4=true}if(/(iPhone|iPod|iPad);?/i.test(navigator.userAgent)||/android/i.test(navigator.userAgent)){a0="http://appstore.com/flickr";if(/Kindle\ Fire|Silk/i.test(navigator.userAgent)){a0="http://www.amazon.com/gp/mas/dl/android?p=com.yahoo.mobile.client.android.flickr";a5=true}else{if(/android/i.test(navigator.userAgent)){a1=true}}if(a5){try{bb=document.createElement("iframe");bb.src=a2;document.body.appendChild(bb)}catch(a8){}bd=setTimeout(function(){if(!Y){F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"0",appstore:"amazon"});window.location=a0}else{F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"1",appstore:"amazon"})}},300)}else{if(a1){F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"0",appstore:"google"});window.location=a2}else{if(a4){if(ad<1){window.location=a2;F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"1",appstore:"apple_webview"});ad++}else{F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"0",appstore:"apple_webview"});window.location.href=a0}}else{a7=new Date();window.setTimeout(function(){a3=new Date();if(a3-a7<2000){F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"0",appstore:"apple"});window.location=a0}else{F.rapidTrack({sec:a9,name:"open",itc:"0",appinstl:"1",appstore:"apple"})}},100);window.location=a2}}}}},showPage:function(a1,a0){if(a1){var a2=aw;aw=a1;if(a2){setTimeout(ab,0,a2,a1,a0)}else{ar(a1,a2)}}},getCurrentPage:function(){return aw},showPageById:function(a3){var a5=aF(a3);if(a5){if(a3.match(/iosauthlogout/i)){h();var a1=document.getElementById("signedin");if(a1){a1.style.display="none"}}var a4=-1;for(var a6=0,a0=A.length;a6<a0;a6++){if(A[a6]===a3){a4=a6;break}}var a2=a4!=-1;if(a2){A.splice(a4,A.length)}F.iphone.showPage(a5,a2);M()}else{F.iphone.showPageById("404")}},showPageByHref:function(a3,a9,a0,a4,a6,a1,a8,bb,a5){var ba=new XMLHttpRequest(),a7=a3;a9=a9||[];if(/\/services\/rest/.test(a3)){F.iphone.showPageById("404");return}if(!a1&&!a8&&a0!=="post"&&typeof I[a3]==="string"&&((new Date()).getTime()-P[a3])<aE){F.iphone.showPageById(I[a3]);if(a6){setTimeout(a6,0,true)}return}if(!a3.match(/^(https?:\/\/)?m\.([a-z]+\.)?flickr\.com\//)||a3.match(/^\/\//)){if(a3.match(/^\//)){a3=window.location.protocol+"//"+window.location.host+a3;a7=a3+" -( rewritten)"}a7+=" -( not fully qual)"}if(at&&!m&&a3.match(/services\/auth/i)||a3.match(/services\/oauth/i)){h()}ba.onerror=function(){j(a6)};ba.onreadystatechange=function(){if(ba.readyState==4){ap();if(ba.getResponseHeader("X-Flickr-Redirect")){document.location=ba.getResponseHeader("X-Flickr-Redirect");return}if(ba.getResponseHeader("X-Flickr-Delayed-Redirect")){setTimeout(function(){document.location=ba.getResponseHeader("X-Flickr-Delayed-Redirect")},1500)}if(ba.responseText===""||ba.status==="0"||ba.status===""){j(a6);return}if(ba.status=="404"){if(a6&&typeof a6==="function"){a6(false)}F.iphone.showPageById("404");return}if(ba.responseText.match(/(\(function\(\))|var\syconf/)){if(al){var bd=ba.responseText.match(/\$\$\$([^\$\n]+)\$\$\$/);if(bd){a7=bd[1]+"[from server]"}else{a7="UKN"}}var bg=ba.getResponseHeader("X-Served-By");var bc=new Image();bc.src="http://www.flickr.com/ios_error_fragment.gne?host="+bg+"&path="+a7;if(a6&&typeof a6==="function"){a6(false)}F.iphone.showPageById("404");return}al=false;var bh=ba.responseText.replace(/<div.*?>\[php\].*?<\/div>/g,"");if(a1&&I[a3]){var bf=aF(I[a3]);var bj=document.createElement("div");bj.innerHTML=bh;if(!bf){F.iphone.insertPages(bj.childNodes)}else{var be,bi=0;do{be=bj.childNodes[bi++]}while(be.nodeType!==1&&bj.childNodes[bi]);bf.innerHTML=be.innerHTML;oldPage=aw;aw=bf;ar(bf,oldPage);P[a3]=(new Date()).getTime()}}else{if(a4){aj(a4,bh)}else{var bj=document.createElement("div");bj.innerHTML=bh;F.iphone.insertPages(bj.childNodes)}}if(a6){setTimeout(a6,0,true)}}};if(!a5){a5=(aw&&aw.id&&aw.id.search(/\/|\?/)!==-1)?location.protocol+"//"+location.host+"/"+aw.id:""}if(!a1){if(/\?xajax=1\&/.test(a3)){a3=a3.replace(/xajax\=1\&/,"")}else{a3=a3.replace(/(\?|\&)xajax\=1/,"")}I[a3]=null;af=a3}if(a3.search(/flickr\.com\/nearby\/?$/)!==-1||a3.search(/^\/nearby\/?$/)!==-1){if(navigator.geolocation&&typeof navigator.geolocation.getCurrentPosition==="function"){navigator.geolocation.getCurrentPosition(a2,a2);return}}if(a3.search(/flickr\.com\/abuse\/?/)!==-1&&s&&(!a9||a9.length===0)){if(s.search(/\/$/)!==-1){a3+=(a3.search(/\?/)===-1?"?":"&")+"goback="+F.iphone.urls.domain+"/"+s}else{a3+=(a3.search(/\?/)===-1?"?":"&")+"goback=#"+s}}a2();function a2(bc){if(bc&&bc.coords&&bc.coords.latitude&&bc.coords.longitude){a3="/nearby/"+bc.coords.latitude+","+bc.coords.longitude+"/"}if(a9){ba.open(a0||"GET",a3+(a3.search(/\?/)===-1?"?":"&")+"xajax=1",true);ba.setRequestHeader("Content-Type","application/x-www-form-urlencoded");ba.setRequestHeader("X-Requested-With",i);if(a5!==""){ba.setRequestHeader(ac,a5)}if(bb){ba.setRequestHeader(a,"1")}ba.send(a9.join("&"))}else{ba.open(a0||"GET",a3+(a3.search(/\?/)===-1?"?":"&")+"xajax=1",true);ba.setRequestHeader("X-Requested-With",i);if(a5!==""){ba.setRequestHeader(ac,a5)}if(bb){ba.setRequestHeader(a,"1")}ba.send(null)}}},insertPages:function(a0){var a2,a1,a4,a3;for(a1=a0.length-1;a1>=0;a1--){a4=a0[a1];if(a4.nodeType==1){a3=aF(a4.id);if(a3){a3.parentNode.replaceChild(a4,a3)}else{document.body.appendChild(a4)}if(a4.style.background.toLowerCase().search(/dd3934|f4d058|rgb\(221, 57, 52\)|rgb\(244, 208, 88\)/)!==-1&&console){if(typeof console.error==="function"){console.error(a4.innerHTML)}else{console.log(a4.innerHTML)}}if(a4.getAttribute("selected")=="true"||!a2){a2=a4}--a1}}P[af]=(new Date()).getTime();if(a2){W(a2);I[af]=a2.id;F.iphone.showPage(a2)}},showSelectedPage:function(a1){if(ao()){return}var a3=(location.hash.search("/")!==-1)?location.hash.substr(J.length):location.hash.substr(1);var a0=a3;var a5=aF(a3);if(a3){if(a3.match(/\/lightbox/)){return}V=(a3.search(J)===-1?J:"")+a3;a3=a3.replace(new RegExp(x,"g"),"?").replace(new RegExp(O,"g"),"=").replace(new RegExp(aG,"g"),"&");if((a3.search("=")===-1&&a3.search("/")===-1)||a5){if(a3==="upload"){n()}F.iphone.showPageById(a0)}else{if(a1){var a4=(document.referrer.search(/m\..*?flickr\.com/)===-1)?document.referrer:null;var a2=(a4===null)}else{var a2=null,a4=null}F.iphone.showPageByHref("/"+a3,null,null,null,null,null,null,a2,a4);if(a3.search("people/contacts")!==-1||a3.search("profile/contacts")!==-1){av()}}}else{if(!F.iphone.globals.loggedin&&F.iphone.globals.firefox_os){F.iphone.showPageByHref("/explore/interesting/")}else{F.iphone.showPageById("home")}}},addComment:function(a0,a5){a5.setAttribute("selected","progress");var a1=t(a5,"form");var a8=a1.message.value;if(a8===""){return}var a9=parseInt(a1.commentsPerPage.value,10),a7=parseInt(a1.commentsSpill.value,10),a6=parseInt(a1.commentsTotalCount.value,10)+1;var a3=Math.ceil(a6/a9);if(a6>0&&a6%a9<=a7){a3--}if(a3===0){a3=1}var a4=["method=flickr.photos.comments.addComment","photo_id="+a0,"comment_text="+encodeURIComponent(a8),"user_id="+F.iphone.globals.nsid];function a2(bb){ap();a5.removeAttribute("selected");if(bb){d(F.iphone.format_strs.add_comment_confirmation,"confirm")}}function ba(bb){if(!bb||bb.responseText===""||bb.status=="404"){a2(false);return}setTimeout(function(){var bc=af;if(bc.search(/\&page\=\d+/)!==-1||bc.search(/\?/)!==-1){bc=bc.replace(/\&page\=\d+/,"")+((a3===1)?"":"&page="+a3)}else{bc=bc.replace(/page\d+/,"")+((a3===1)?"":"page"+a3)}F.iphone.showPageByHref(bc,null,null,null,a2,true)},300)}E(a4,ba)},addGalleryComment:function(a4,a1){a1.setAttribute("selected","progress");var a3=t(a1,"form");var a2=a3.message.value;if(a2===""){return}var a5=["method=flickr.galleries.comments.addComment","gallery_id="+F.iphone.globals.nsid+"-"+a4,"comment_text="+encodeURIComponent(a2)];function a0(a7){ap();a1.removeAttribute("selected");if(a7){d(F.iphone.format_strs.add_comment_confirmation,"confirm")}}function a6(a7){if(!a7||a7.responseText===""||a7.status=="404"){a0(false);return}setTimeout(function(){var a8=af;F.iphone.showPageByHref(a8,null,null,null,a0,true)},300)}E(a5,a6)},editPhotoLicense:function(a1,a7){a7.setAttribute("selected","progress");var a2=t(a7,"form");var a0=a2.license;var a3=0;for(var a4=0,a8=a0.length;a4<a8;a4++){if(a0[a4].checked){a3=a0[a4].value;break}}function a5(ba){ap();a7.removeAttribute("selected");if(ba){d(F.iphone.format_strs.edit_photo_license_confirmation,"confirm")}}var a6=["method=flickr.photos.licenses.setLicense","photo_id="+a1,"license_id="+a3];function a9(ba){if(!ba||ba.responseText===""||ba.status=="404"){a5(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\?type\=photo_license_edit/,""),null,null,null,a5,null,true)},1000)}E(a6,a9,true)},editPhotoPrivacy:function(a1,a5){a5.setAttribute("selected","progress");var a2=t(a5,"form");var a6=a2.is_public[(at?1:0)].checked?0:1;var a8=0,a0=0;if(!a6){a8=a2.is_friend.checked?1:0;a0=a2.is_family.checked?1:0}function a3(a9){ap();a5.removeAttribute("selected");if(a9){d(F.iphone.format_strs.edit_photo_privacy_confirmation,"confirm")}}var a4=["method=flickr.photos.setPerms","photo_id="+a1,"is_public="+a6,"is_friend="+a8,"is_family="+a0];function a7(a9){if(!a9||a9.responseText===""||a9.status=="404"){a3(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\?type\=photo_privacy_edit/,""),null,null,null,a3,null,true)},1000)}E(a4,a7)},editPhotoSafety:function(a0,a6){a6.setAttribute("selected","progress");var a1=t(a6,"form");var a5=a1.batch_safety_level,a8;for(var a2=0,a7=a5.length;a2<a7;a2++){if(a5[a2].checked){a8=a5[a2].value}}function a3(ba){ap();a6.removeAttribute("selected");if(ba){d(F.iphone.format_strs.edit_photo_safety_confirmation,"confirm")}}var a4=["method=flickr.photos.setSafetyLevel","photo_id="+a0,"safety_level="+a8];function a9(ba){if(!ba||ba.responseText===""||ba.status=="404"){a3(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\?type\=photo_safety_edit/,""),null,null,null,a3,null,true)},1000)}E(a4,a9,true)},editPhoto:function(a0,a2){a2.setAttribute("selected","progress");var a3=t(a2,"form");var a6=a3.title.value;var a5=a3.description.value;var a4=["method=flickr.photos.setMeta","photo_id="+a0,"title="+encodeURIComponent(a6),"description="+encodeURIComponent(a5)];function a1(a8){ap();a2.removeAttribute("selected");if(a8){d(F.iphone.format_strs.edit_photo_confirmation,"confirm")}}function a7(ba){if(!ba||ba.responseText===""||ba.status=="404"){a1(false);return}var bb=true;var a8=ba.responseXML.documentElement.getElementsByTagName("err");if(a8&&a8.length){var a9=a8[0];if(a9.getAttribute("code")=="116"){scrollTo(0,1);d(F.iphone.format_strs.spam_url_warning,"warn");a1(false);bb=false}}if(bb){setTimeout(function(){F.iphone.showPageByHref(af.replace(/\?type\=photo_edit/,""),null,null,null,a1,null,true)},1000)}}E(a4,a7)},deletePhoto:function(a0,a2){a2.setAttribute("selected","progress");function a1(a5){ap();a2.removeAttribute("selected");if(a5){d(F.iphone.format_strs.delete_photo_confirmation,"confirm")}}var a3=["method=flickr.photos.delete","photo_id="+a0];function a4(a5){if(!a5||a5.responseText===""||a5.status=="404"){a1(false);return}setTimeout(function(){F.iphone.showPageByHref(F.iphone.urls.you_photostream,null,null,null,a1,null,true)},1000)}E(a3,a4)},editComment:function(a2,a1){a1.setAttribute("selected","progress");var a4=t(a1,"form");var a3=a4.message.value;if(a3===""){return}var a5=["method=flickr.photos.comments.editComment","comment_id="+a2,"comment_text="+encodeURIComponent(a3),"user_id="+F.iphone.globals.nsid];function a0(a7){ap();a1.removeAttribute("selected");if(a7){d(F.iphone.format_strs.edit_comment_confirmation,"confirm")}}function a6(a7){if(!a7||a7.responseText===""||a7.status=="404"){a0(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\??edit_comment=\d*?$/,""),null,null,null,a0,null,true)},1000)}E(a5,a6)},deleteComment:function(a2,a1){a1.setAttribute("selected","progress");var a3=["method=flickr.photos.comments.deleteComment","comment_id="+a2,"user_id="+F.iphone.globals.nsid];function a0(a5){ap();a1.removeAttribute("selected");if(a5){d(F.iphone.format_strs.delete_comment_confirmation,"confirm")}}function a4(a5){if(!a5||a5.responseText===""||a5.status=="404"){a0(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\??delete_comment=\d*?$/,""),null,null,null,a0,null,true)},1500)}E(a3,a4)},editGalleryComment:function(a2,a1){a1.setAttribute("selected","progress");var a4=t(a1,"form");var a3=a4.message.value;if(a3===""){return}var a5=["method=flickr.galleries.comments.editComment","comment_id="+a2,"comment_text="+encodeURIComponent(a3),"user_id="+F.iphone.globals.nsid];function a0(a7){ap();a1.removeAttribute("selected");if(a7){d(F.iphone.format_strs.edit_comment_confirmation,"confirm")}}function a6(a7){if(!a7||a7.responseText===""||a7.status=="404"){a0(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\??edit_comment=\d*?$/,""),null,null,null,a0,null,true)},1000)}E(a5,a6)},deleteGalleryComment:function(a2,a1){a1.setAttribute("selected","progress");var a3=["method=flickr.galleries.comments.deleteComment","comment_id="+a2,"user_id="+F.iphone.globals.nsid];function a0(a5){ap();a1.removeAttribute("selected");if(a5){d(F.iphone.format_strs.delete_comment_confirmation,"confirm")}}function a4(a5){if(!a5||a5.responseText===""||a5.status=="404"){a0(false);return}setTimeout(function(){F.iphone.showPageByHref(af.replace(/\??delete_comment=\d*?$/,""),null,null,null,a0,null,true)},1500)}E(a3,a4)},changeRelationship:function(a4,a5,a8){var a0;switch(a8){case"add":a0="flickr.contacts.add";break;case"edit":a0="flickr.contacts.edit";break;case"remove":a0="flickr.contacts.remove"}var a3=["method="+a0,"user_id="+a4];if(a8==="add"||a8==="edit"){var a6=false,a7=false;if(a5){a5.setAttribute("selected","progress");var a1=t(a5,"form");a6=a1.is_friend.checked;a7=a1.is_family.checked}a3.push("friend="+(a6?1:0));a3.push("family="+(a7?1:0))}function a2(ba){ap();a5.removeAttribute("selected");if(ba){d(F.iphone.format_strs.change_relationship_confirmation,"confirm")}}function a9(ba){if(!ba||ba.responseText===""||ba.status=="404"){a2(false);return}setTimeout(function(){F.iphone.showPageByHref(F.iphone.urls.photostream_base+a4,null,null,null,a2)},500)}E(a3,a9)},acceptGroupInvite:function(a3,a4,a0,a2){a2.setAttribute("selected","progress");var a5=["method=flickr.groups.invite.photo.accept","photo_id="+a3,"group_id="+a4,"user_id="+F.iphone.globals.nsid];function a1(a7){ap();if(a7){d(a0?F.iphone.format_strs.group_invite_accept_confirmation_video:F.iphone.format_strs.group_invite_accept_confirmation_photo,"confirm")}else{a2.removeAttribute("selected")}}function a6(a8){if(!a8||a8.responseText===""||a8.status=="404"){a1(false)}else{var a7=a2.parentNode;a7.parentNode.removeChild(a7);a1(true)}}E(a5,a6)},declineGroupInvite:function(a3,a4,a0,a2){a2.setAttribute("selected","progress");var a5=["method=flickr.groups.invite.photo.decline","photo_id="+a3,"group_id="+a4,"user_id="+F.iphone.globals.nsid];function a1(a7){ap();if(a7){d(F.iphone.format_strs.group_invite_decline_confirmation,"confirm")}else{a2.removeAttribute("selected")}}function a6(a8){if(!a8||a8.responseText===""||a8.status=="404"){a1(false)}else{var a7=a2.parentNode;a7.parentNode.removeChild(a7);a1(true)}}E(a5,a6)},filterContactList:function(be,bi,bd){if(bi){var a1=be;a1.setAttribute("selected","progress");be=a1.parentNode.getElementsByTagName("input")[0]}if(be.className.match(/grey/)){be.className=be.className.replace(/\s*grey\s*/,"");be.value="";return}else{if(ah&&!bi){return}}var bf=be.value.toLowerCase();var bn=(bf==="");if(ak==bf){return}ak=bf;var bm=new RegExp(bf,"gi"),ba,a0=0,a3=[],a2;if(ah){function a8(){a1.removeAttribute("selected")}F.iphone.showPageByHref(F.iphone.urls.contact_search_base+encodeURIComponent(bf),null,null,null,a8);return}if(!bn){var a4,a5;for(var bg=0,bh,bl=q.length;bg<bl;bg++){ba=a9(bm,q[bg]);if(ba){a4=(q[bg].friend==="1"&&q[bg].family==="1")?F.iphone.format_strs.contact_list_friend_and_family:(q[bg].friend==="1"?F.iphone.format_strs.contact_list_friend:(q[bg].family==="1"?F.iphone.format_strs.contact_list_family:F.iphone.format_strs.contact_list_contact));a5=(q[bg].iconfarm!=="0")?("http://farm"+q[bg].iconfarm+".staticflickr.com/"+q[bg].iconserver+"/buddyicons/"+q[bg].nsid+".jpg"):("http://www.flickr.com/images/buddyicon.gif");if(F.config.flickr.is_secure){a5=a5.replace("http:","https:")}a0++;a2=document.createElement("li");a2.className="contact";a2.innerHTML='<a href="'+F.iphone.urls.photostream_base+(q[bg].path_alias?q[bg].path_alias:q[bg].nsid)+'/"><span class="img_block"><img src="'+a5+'" alt="" class="BuddyIconX" height="48" width="48"></span><div class="meta_block"><p class="searchable contact-username">'+bj(q[bg].username,bm,bf.length)+'</p><p class="searchable contact-name">'+bj(q[bg].realname,bm,bf.length)+"</p><p>"+aK(q[bg].public_photos_count)+" "+(parseInt(q[bg].public_photos_count,10)===1?F.iphone.format_strs.contact_list_item:F.iphone.format_strs.contact_list_items)+" / "+a4+"</p></div></a>";a3.push(a2)}}}var bk=t(be,"ul");var a6=v("contact-search-term","span",bk)[0];var bb=v("no-results","li",bk)[0];a6.innerHTML=e(bf);bb.style.display=(a0===0&&!bn)?"block":"";var a7=be.parentNode.parentNode;var bo=a7.getElementsByTagName("li");for(var bg=0;bg<bo.length;){if(bo[bg].className.match(/^contact$/)){a7.removeChild(bo[bg]);continue}else{if(bo[bg].className.match(/^(pagination|contact-orig|group)$/)){bo[bg].style.display="none"}}bg++}if(a0>0){var bc=v("footer","div",a7)[0];for(var bg=0,bl=a3.length;bg<bl;bg++){(bc)?a7.insertBefore(a3[bg],bc):a7.appendChild(a3[bg])}}else{if(bn){for(var bg=0,bl=bo.length;bg<bl;bg++){if(bo[bg].className.match(/^pagination$/)||bo[bg].className.match(/^contact-orig$/)||bo[bg].className.match(/^group$/)){bo[bg].style.display="block"}}}}function a9(bq,bp){if(bp.realname.search(bq)!==-1){return true}if(bp.username.search(bq)!==-1){return true}return false}function bj(bt,br,bp){if(bt.search(br)===-1){return e(bt)}var bq=bt.search(br),bs=bq+bp;return e(bt.substring(0,bq))+"<b>"+e(bt.substring(bq,bs))+"</b>"+e(bt.substring(bs,bt.length))}},toggleFavorite:function(a0,a1){var a4,a3,a2;a3=v("photo_faves_num","span",F.iphone.getCurrentPage());if(a3.length){a3=a3[0]}if(aZ(a1,"favd")){aX(a1,"favd");a4="flickr.favorites.remove";if(a3){a3.innerHTML=parseInt(a3.innerHTML,10)-1}}else{aS(a1,"favd");a4="flickr.favorites.add";if(a3){a3.innerHTML=parseInt(a3.innerHTML,10)+1}}a2=["method="+a4,"photo_id="+a0,"user_id="+F.iphone.globals.nsid];E(a2)},selectAbuseCategory:function(){az(aF("abuse-category-form"));return false},checkAbuseForm:function(){if(aF("entered_email")){var a1=aF("entered_email").value;if(a1===""){d(F.iphone.format_strs.report_abuse_email_empty,"warn");return false}}if(aF("spam_trap")){var a0=aF("spam_trap").value;if(a0===""){d(F.iphone.format_strs.report_abuse_magic_field_empty,"warn");return false}if(a0!="flickr"){d(F.iphone.format_strs.report_abuse_magic_field_incorrect,"warn");return false}}return true},addUploadFeature:function(){w=(F.iphone.globals.mobile_app&&window.Device&&window.Device.platform);if(w){var a0=document.createElement("script");a0.src="/javascript/mobile_app.js";document.getElementsByTagName("head")[0].appendChild(a0)}},showAdvSearch:function(){X=true;aF("adv-search-options").style.display="block";aF("adv-search-toggle").style.display="none"},setSearchUI:function(a4){var a1=a4.options,a2="";for(var a3=0,a0=a1.length;a3<a0;a3++){if(a1[a3].selected){a2=a1[a3].value;break}}if(a2==="people"){aS(aF("search-submit"),"solo");aS(aF("main-search-form"),"people");aF("adv-search-options").style.display="none";aF("adv-search-toggle").style.display="none"}else{if(X){aX(aF("search-submit"),"solo");aX(aF("main-search-form"),"people");aF("adv-search-options").style.display="block";aF("adv-search-toggle").style.display="none"}else{aX(aF("search-submit"),"solo");aX(aF("main-search-form"),"people");aF("adv-search-options").style.display="none";aF("adv-search-toggle").style.display="block"}}},setSearchFields:function(a1){var a2=aF("search-field"),a0=aF("search-field-welcome");if(a1&&a1.value){if(a1.id==="search-field-welcome"&&a2){a2.value=a1.value}else{if(a1.id==="search-field"&&a0){a0.value=a1.value}}}},setRelationshipUi:function(a0){var a3=t(a0.el,"form");var a4=a3.is_contact,a1=a3.is_friend,a5=a3.is_family;if((a1.checked||a5.checked)&&!a4.checked&&!aZ(a0.el,"is_contact")){a4.checked=true}if((a1.checked||a5.checked)&&!a4.checked&&aZ(a0.el,"is_contact")){a1.checked=false;a5.checked=false}var a6=v("contact-ok-button","a",a3)[0],a2=v("contact-remove-button","a",a3)[0];if(!a1.checked&&!a5.checked&&!a4.checked&&!a0.is_contact){a6.setAttribute("disabled",true);aS(a6,"DisabledButt")}else{a6.removeAttribute("disabled");aX(a6,"DisabledButt")}if(!a1.checked&&!a5.checked&&!a4.checked&&a0.is_contact){a6.style.display="none";a2.style.display="block"}else{a2.style.display="none";a6.style.display="block"}},toggleCommentHTML:function(a1){var a2=a1.parentNode;var a0=v("some-html","div",a2.parentNode.parentNode)[0];if(aZ(a2,"open")){aX(a2,"open");a0.style.display=""}else{aS(a2,"open");a0.style.display="block"}},togglePrivacyBoxes:function(a0){var a2=t(a0,"form");var a1=a2.is_public[(at?1:0)].checked?0:1;if(!a1){a2.is_friend.disabled=false;a2.is_family.disabled=false;a2.is_friend.parentNode.className="";a2.is_family.parentNode.className=""}else{a2.is_friend.disabled=true;a2.is_family.disabled=true;a2.is_friend.parentNode.className="disabled";a2.is_family.parentNode.className="disabled"}},setRpCookie:function(){var a0=new Date();a0.setTime(a0.getTime()+(365*24*60*60*1000));document.cookie="flrp=1; expires="+a0.toUTCString()+"; path=/; domain=.flickr.com";document.cookie="flsp=0; expires=Monday, 19-Aug-1996 05:00:00 GMT; path=/; domain=.flickr.com";window.location.reload();return false},setAllowWWWCookie:function(){if(!F.iphone.globals.redirected){return true}var a2=new Date();a2.setTime(a2.getTime()+(365*24*60*60*1000));document.cookie="mobile_allow_www=1; expires="+a2.toUTCString()+"; path=/; domain=.flickr.com";var a1=window.location.protocol+"//"+window.location.hostname.replace(/m\./,"")+"/";var a0=aw.id.replace(new RegExp(x,"g"),"?").replace(new RegExp(O,"g"),"=").replace(new RegExp(aG,"g"),"&");if(a0.search("=")!==-1||a0.search("/")!==-1){a1+=a0}window.location.href=a1;return false}};addEventListener("resize",M);addEventListener("load",function(a0){ax();F.iphone.showSelectedPage(true);setTimeout(z,0);setTimeout(p,0);aH=setInterval(p,300);setTimeout(function(){aF("large-loader").style.display="none"},3000)},false);addEventListener("click",function(a0){var a8=t(a0.target,"a"),a2,a5,ba,a7;aQ=window.scrollY;if(a8&&a8.getAttribute("selected")=="progress"){a0.preventDefault();return}else{if(a8){a8.blur();function a3(){ap();a8.removeAttribute("selected")}if(/(?:^|\s)mobile-app-cta(?!\S)/.test(a8.className)){a0.preventDefault();a0.stopPropagation();ba=a8.getAttribute("href");if(F.guestpass){ba="gp/"+F.guestpass.path+"/"+F.guestpass.code}if(/android/i.test(navigator.userAgent)){ba="deep"+ba}else{ba="flickr://"+ba}F.iphone.deepLink(ba,"appbutton");return}if(a8.href.search(/^(\/|\#)/)===-1&&a8.href.search(/^https?:\/\//)===-1){return}if(a8.href.search(/^http/)!==-1&&a8.href.search(/[\/\.]flickr.com/)===-1){return}if(a8.href.search(/comment_form/)!==-1){a0.preventDefault();a7=aw.getElementsByTagName("textarea")[0];a7.name==="message"&&a7.focus();return}if(a8.href.search(/flickr\.com\/?(.+)lightbox/)!==-1){scrollTo(0,1);var a4=document.createElement("div"),bb=a4.style;bb.height="700px";bb.width="100%";bb.background="#141414";bb.zIndex=99;bb.position="absolute";bb.top="0";bb.left="0";bb.display="block";document.querySelector("body").appendChild(a4);var a9=aF("large-loader");a9.style.display="block";a9.style.zIndex=100;return}else{if(a8.href&&(a8.href.search(/flickr\.com\/photos\/(.*?)\/\d+\/*/i)!==-1||a8.href.search(/flickr\.com\/photos\/(.*?)\/sets\/\d+\/*/i)!==-1||a8.href.search(/flickr\.com\/photos\/(.*?)\/collections\/\d+\/*/i)!==-1)&&a8.href.search(/m\..*?flickr\.com/i)===-1){a0.preventDefault();F.iphone.showPageByHref(a8.href.replace(/http\:\/\//,"").replace(/^.*flickr\.com/i,"").replace(/\#.*$/,""),null,null,null,a3)}else{if(a8.href&&a8.href.search(/flickr\.com/i)!==-1&&a8.href.search(/m\..*?flickr\.com/i)===-1){return}else{if(a8.href&&(a8.href.match(/m\..*?flickr\.com\/places\//i)||a8.href.match(/m\..*?flickr\.com\/upgrade\//i)||a8.href.match(/m\..*?flickr\.com\/groups\//i)||a8.href.match(/m\..*?flickr\.com\/photos\/tags\//i)||a8.href.match(/m\..*?flickr\.com\/help\/contact\//i)||a8.getAttribute("type")=="external")){a0.preventDefault();document.location=a8.href.replace(/m\./i,"");return}else{if(a8.href&&a8.hash&&a8.hash!="#"){a8.setAttribute("selected","true");var a6=aF(a8.hash.substr(1));if(a6.id==="upload"){n()}F.iphone.showPage(a6);setTimeout(a3,500)}else{if(a8==aF("backButton")||a8.getAttribute("type")=="back"){history.back()}else{if(a8.getAttribute("type")=="submit"){var a1=t(a8,"form");if(a1.enctype==="multipart/form-data"){return}a8.setAttribute("selected","progress");az(a1,null,a3)}else{if(a8.getAttribute("type")=="preview"){a8.setAttribute("selected","progress");az(t(a8,"form"),["preview=true"],a3)}else{if(a8.getAttribute("type")=="js"||a8.getAttribute("type")=="logout"||a8.getAttribute("type")=="signin"||a8.getAttribute("type")=="video_play"){return}else{if(a8.getAttribute("type")=="refresh"){a8.setAttribute("selected","progress");F.iphone.showPageByHref(a8.href,null,null,null,a3,null,true)}else{if(a8.getAttribute("type")=="report_abuse"){a8.setAttribute("selected","progress");if(aw&&aw.id){s=aw.id}F.iphone.showPageByHref(a8.href,null,null,null,a3,null,true)}else{if(a8.getAttribute("type")=="disabled"){a0.preventDefault();return}else{if(a8.getAttribute("type")=="hide_message"){a0.preventDefault();au();return}else{if(a8.target=="_replace"){a8.setAttribute("selected","progress");F.iphone.showPageByHref(a8.href,null,null,a8,a3)}else{if(a8.target==="sb-close"){a5=v("mobile-app-cta")[0];if(a5){a5.className="mobile-app-cta"}return}}}}}}}}}}}}}}}if(aO){aO.abort();aO=null}else{if(!a8.target){a8.setAttribute("selected","progress");if(a8.getAttribute("type")=="fetch_contacts"){av()}if(a8.getAttribute("type")=="nav"||a8.getAttribute("type")=="subnav"||a8.getAttribute("type")=="fetch_contacts"){S()}r=false;F.iphone.showPageByHref(a8.href,null,null,null,a3)}else{return}}a0.preventDefault()}}},true);addEventListener("submit",function(a3){var a2=a3.target;var a1=v("form-submit","input",a2)[0];a1.blur();a1.setAttribute("selected","progress");function a0(){ap();a1.removeAttribute("selected")}if(a2){if(a2.onsubmit&&!a2.onsubmit()){a3.preventDefault();return}if(a2.enctype==="multipart/form-data"){return}az(a2,null,a0)}a3.preventDefault()},true);function u(a0){if(a0.type=="touchstart"){aY=true;if(a0.touches.length==1){oX=a0.touches[0].pageX;a2=0;a1=0}}else{if(a0.type=="touchmove"){if(a0.touches.length==1){var a2=a0.touches[0].pageX;if(oX>a2){var a1=oX-a2;if(a1>100){if(aY===true){aY=false;history.forward()}}}else{var a1=a2-oX;if(a1>100){if(aY===true){aY=false;history.back()}}}}}else{if(a0.type=="touchend"||a0.type=="touchcancel"){aY=false}}}}function M(){var a3=aw.id,a1,a6,a2,a0,a5,a7,a4;a3=a3.replace(new RegExp(x,"g"),"?").replace(new RegExp(O,"g"),"=").replace(new RegExp(aG,"g"),"&");if(F.mob_photo_update&&/photos\/(.*?)\/\d+\/*/i.test(a3)){ax();a1=aw.getElementsByClassName("photo_top_container")[0];a2=a1.getElementsByClassName("landscape");a0=a1.getElementsByClassName("portrait");if(C){a4=a2;a5=a0}else{a4=a0;a5=a2}if(a4&&a4.length>0){a4=a4[0];if(a5&&a5.length>0){a5=a5[0];a4.className=a4.className.replace(/(?:^|\s)hidden(?!\S)/,"");if(!(/(?:^|\s)hidden(?!\S)/.test(a5.className))){a5.className=a5.className+" hidden"}return}if(/(?:^|\s)hidden(?!\S)/.test(a4.className)){a4.className=a4.className.replace(/(?:^|\s)hidden(?!\S)/,"");a7=a4.getElementsByClassName("loading-balls");if(a7&&a7[0]){a7=a7[0];if(!(/(?:^|\s)hidden(?!\S)/.test(a7.className))){a7.className=a7.className+" hidden"}}}return}if(aM){return}aO=new XMLHttpRequest();aO.onerror=function(){aM=false;j();aO=null};aO.onreadystatechange=function(){if(aO.readyState===4){if(!(/(?:^|\s)hidden(?!\S)/.test(a7.className))){a7.className=a7.className+" hidden"}aM=false;if(a3!==aw.id){return}if(aO.responseText===""||aO.status==="0"||aO.status===""){j();return}if(aO.status=="404"){F.iphone.showPageById("404");return}a1=aw.getElementsByClassName("photo_top_container")[0];if(C){a6=a1.getElementsByClassName("portrait")[0];a6.className=a6.className+" hidden"}else{a6=a1.getElementsByClassName("landscape")[0];a6.className=a6.className+" hidden"}a1.innerHTML=aO.responseText+a1.innerHTML;aO=null}};aO.open("POST",a3,true);aO.setRequestHeader("Content-type","application/x-www-form-urlencoded");aO.send("pf=1");aM=true;a7=a5[0].getElementsByClassName("loading-balls");if(a7&&a7[0]){a7=a7[0];if(/(?:^|\s)hidden(?!\S)/.test(a7.className)){a7.className=a7.className.replace(/(?:^|\s)hidden(?!\S)/,"")}}}}function E(a3,a4,a1){a3.push("src=js");a3.push("api_key="+F.iphone.globals.magisterLudi);a3.push("auth_hash="+F.iphone.globals.auth_hash);a3.push("auth_token="+F.iphone.globals.auth_token);a3.push("cb="+new Date().getTime());var a2=new XMLHttpRequest();a2.onerror=function(){j(a4)};a2.onreadystatechange=function(){if(a2.readyState===4){var a5=a2.responseXML.documentElement;if(a5&&a5.getAttribute("stat")=="ok"){if(typeof a4==="function"){a4(a2)}}else{scrollTo(0,1);d(F.iphone.format_strs.no_connection_message,"warn")}}};if(a1){var a0=F.iphone.globals.flickr_api_uri;a3=a3.join("&");a2.open("POST",a0,true);a2.withCredentials=true;a2.setRequestHeader("Content-type","application/x-www-form-urlencoded");a2.send(a3)}else{var a0=F.iphone.globals.flickr_api_uri+"?"+a3.join("&");a2.open("GET",a0,true);a2.withCredentials=true;a2.send(null)}}function aB(a7){var a6="//geo.yahoo.com/b?",a0=document.createElement("img"),a1=aF("beacon");if(!a7||!a1||!a1.getElementsByTagName("img")[0]){return false}var a2=a1.getElementsByTagName("img")[0].src;a2=a2.substr(a2.indexOf("?")+1);var a3=a2.split("&");var a8={s:a7,t:(new Date()).getTime()};var a9=null;for(var a4=0,a5=a3.length;a4<a5;a4++){a9=a3[a4].split("=")[0];if(a8[a9]){a3[a4]=a9+"="+a8[a9]}}a0.src=a6+a3.join("&");a1.appendChild(a0)}function g(a8,a6){var a4,a9,a0,a1,a5,ba,a3,a7,a2;if(F.iphone.globals.loggedin){a4=aF("activity-tab");a9=aF("contacts-tab");a0=aF("you-tab");a1=aF("more-tab");if(a4){a4.className=""}if(a9){a9.className=""}if(a0){a0.className=""}if(a1){a1.className=""}}else{a5=aF("welcome-tab");ba=aF("explore-tab");a3=aF("nearby-tab");a7=aF("search-tab");if(a5){a5.className=""}if(ba){ba.className=""}if(a3){a3.className=""}if(a7){a7.className=""}}if(typeof a8==="string"&&((F.iphone.globals.loggedin&&a8.match(/activity|contacts|you|more/))||(!F.iphone.globals.loggedin&&a8.match(/welcome|explore|nearby|search/)))){a2=aF(a8+"-tab");if(a2){a2.className="selected"}}aU(a8,a6)}function aU(a2,a1){var a3="";switch(a2){case"contacts":a3='<li class="first'+(a1==="uploads"?" selected":"")+'"><a href="'+F.iphone.urls.contacts_uploads+'" id="contacts_uploads_subtab" type="subnav">'+F.iphone.format_strs.iphone_recent_uploads+'</a></li><li class="last'+(a1==="list"?" selected":"")+'"><a href="'+F.iphone.urls.contacts_list+'" type="fetch_contacts" id="contacts_list_subtab">'+F.iphone.format_strs.iphone_contact_list+"</a></li>"}var a0=aF("nav_sub"),a4=aF("header");if(a3===""){aX(a4,"show-sub-nav")}else{aS(a4,"show-sub-nav")}a0.innerHTML=a3}function n(){var a0=3450,a2=1111,a1=aF("e_"+(a0+a2+4));if(a1&&!c){var a3=["method=flickr.people.getMagicEmail","user_id="+F.iphone.globals.nsid];function a4(a6){if(!a6||!a6.responseXML||a6.status=="404"){return}magicEmailFecurrentPagetched=true;var a5=a6.responseXML.documentElement.getElementsByTagName("user")[0].getAttribute("magic_email");a1.href="mailto:"+a5+"@photos.flickr.com";a1.innerHTML=a5+"@photos.flickr.com"}E(a3,a4)}}function ao(){var a3=false,a2=false,a1=J,a0=location.search;search="";if(location.pathname!=="/"&&location.pathname!==""){a3=true;a2=true;a1+=location.pathname.replace(/^\//,"");if(a1.search(/\/$/)===-1){a1+="/"}}if(a0!==""){if(a0.search(/loggedout/)!==-1){a2=false;search="?loggedout=1"}if(a0.search(new RegExp(D))!==-1){passNewVar=true;search="?"+D+"=1"}if(a0.search(/cb/)!==-1){a0=a0.replace(/\?cb\=\d+/,"");if(a0!==""&&a0.search(/\?/)===-1){a0=a0.replace(/\&/,"?")}a3=true}a1+=a0.replace(/\?/,x).replace(/\&/g,aG).replace(/\=/g,O);if(location.pathname==="/photo.gne"&&location.search.search(/id=/)!==-1){location.href="/photos/_/"+location.search.replace(/\?id=(\d*)/,"$1")+"/";return true}}if(a3){location.href="/"+search+(a2?a1:"")}return a3}function av(){var a0=["method=flickr.contacts.getList","page=1","per_page="+L];function a1(a3){if(!a3||!a3.responseXML||a3.status=="404"){return}var a4=a3.responseXML.documentElement.getElementsByTagName("contacts")[0];if(parseInt(a4.getAttribute("total"),10)>L){ah=true;aS(document.body,"scrumjax-search");return}var a6=a3.responseXML.documentElement.getElementsByTagName("contact");q=[];for(var a5=0,a2=a6.length;a5<a2;a5++){q.push({nsid:a6[a5].getAttribute("nsid"),username:a6[a5].getAttribute("username"),iconserver:a6[a5].getAttribute("iconserver"),iconfarm:a6[a5].getAttribute("iconfarm"),ignored:a6[a5].getAttribute("ignored"),realname:a6[a5].getAttribute("realname"),friend:a6[a5].getAttribute("friend"),family:a6[a5].getAttribute("family"),public_photos_count:a6[a5].getAttribute("public_photos_count"),path_alias:a6[a5].getAttribute("path_alias")})}}E(a0,a1)}function p(){if(window.innerWidth!=f){f=window.innerWidth;Z=window.innerHeight;var a0=(f<=Z)?"profile":"landscape";document.body.setAttribute("orient",a0);if(!F.showing_app_interstitial&&r&&typeof aL()==="number"&&aL()>=6){}else{scrollTo(0,1)}}if(location.hash!==V&&location.hash.search(/comment_form/)===-1){F.iphone.showSelectedPage()}}function S(){var a0=aF("global-loading");if(a0){a0.style.display="block"}}function ap(){var a0=aF("global-loading");if(a0){a0.style.display=""}}function l(a2,a0){var a1=document.createElement("div");a1.id="modal-wrap";a1.innerHTML=a2;a1.innerHTML=a2;document.body.style.position="relative";document.body.appendChild(a1);a1.ontouchmove=function(a3){a3.preventDefault()};a1.onclick=function(a8){var a7=(a8.target.className.split(" ")),a3=a7.length,a6;for(var a5=0;a5<a3;a5++){if(a7[a5]==="dismiss"){a8.preventDefault();a1.style.display="none";if(a0){a0(a8);return}}}if(a8.target.parentNode.tagName=="A"){a6=a8.target.parentNode}else{if(a8.target.tagName=="A"){a6=a8.target}}if(a6){a8.preventDefault();var a4=a6.href;a0(a8,function(){window.location=a4})}}}function aL(){if("memo" in aL){return aL.memo}var a1=navigator.userAgent,a2,a0,a3;if(/ Mobile\//.test(a1)||(/iPad|iPod|iPhone/).test(a1)){a2=a1.match(/OS ([^\s]*)/);if(a2&&a2[1]){a3=0;a0=parseFloat(a2[1].replace("_",".").replace(/\./g,function(){return(a3++===1)?"":"."}))}}aL.memo=a0;return a0}function ar(a4,a0){var a7;if(!a4){return}if(a0){a0.removeAttribute("selected")}a4.setAttribute("selected","true");a4.style.left="0%";if(!F.showing_app_interstitial&&r&&typeof aL()==="number"&&aL()>=6){}else{if(/photos\/(.*?)\/\d+\/(.*?)\/page\d+/i.test(a4.id)){a7=a4.getElementsByClassName("photo_comments");if(a7&&a7.length>0){scrollTo(0,aQ)}aQ=1}else{scrollTo(0,1)}}W(a4);location.href=V=J+a4.id;A.push(a4.id);var a5=a4.getAttribute("tab"),a3=a4.getAttribute("subtab");g(a5,a3);var a9=a4.getAttribute("spaceid");if(!al){aB(a9)}var a2=a4.getAttribute("rel-canonical"),a1=aF("rel-can");if(a2){if(a1){a1.setAttribute("href",a2)}else{a1=document.createElement("link");a1.setAttribute("rel","canonical");a1.setAttribute("href",a2);a1.setAttribute("id","rel-can");document.getElementsByTagName("head")[0].appendChild(a1)}}else{if(a1){a1.parentNode.removeChild(a1)}}var a6=v("footer","div",a4);var bb=aF("footer");if(a6.length===0&&bb){var a8=document.createElement("div");a8.className="footer"+(bb.className?" "+bb.className:"");a8.innerHTML=bb.innerHTML;a4.appendChild(a8)}if(aP){aF("large-loader").style.display="none";aP=false}var ba=document.getElementById("android-upsell-modal");if(ba&&!document.cookie.match(/fldroidus=1/)&&navigator.userAgent.match(/Android/i)&&!a4.id.match(/services\/auth/i)&&!a4.id.match(/services\/oauth/i)&&!navigator.userAgent.match(/ChaCha/i)&&!navigator.userAgent.match(/MeeGo|NokiaN9/i)&&!navigator.userAgent.match(/HTC/i)){l(document.getElementById("android-upsell-modal").innerHTML,function(be,bc){var bd=new Date();bd.setTime(bd.getTime()+G);document.cookie="fldroidus=1;expires="+bd.toGMTString()+" UTC;domain=.flickr.com;path=/";if(bc){bc()}})}if(F.enable_ios_app_promo_interstitial){aC()}}function W(a0){if(a0&&!a0.id){id=af.replace(/^https?\:\/\/.*?flickr\.com/,"").replace(/^\//,"").replace(/\?/,x).replace(/\&/g,aG).replace(/\=/g,O).replace(/\%20|\s/g,aq);a0.id=id}}function B(a0,a1){if(a0.search(a1+"=")===-1){return""}return a0.replace(new RegExp("^.*?"+a1+"=(.*?)","i"),"$1").replace(/\&.*$/,"")}function am(a5,a4,a1){var a2=(a1?a5:a4).getAttribute("axis");if(a2=="y"){(a1?a5:a4).style.top="100%"}else{a4.style.left="100%"}a4.setAttribute("selected","true");scrollTo(0,1);clearInterval(aH);var a3=100;a0();var a6=setInterval(a0,aa);function a0(){a3-=ai;if(a3<=0){a3=0;if(!aZ(a4,"dialog")){a5.removeAttribute("selected")}clearInterval(a6);aH=setInterval(p,300);ar(a4,a5)}if(a2=="y"){a1?a5.style.top=(100-a3)+"%":a4.style.top=a3+"%"}else{a5.style.left=(a1?(100-a3):(a3-100))+"%";a4.style.left=(a1?-a3:a3)+"%"}}}function ae(a2,a1,a0){a1.style.left="100%";a1.setAttribute("selected","true");scrollTo(0,1);clearInterval(aH);a2.style.webkitAnimationDuration="1s";a2.style.webkitAnimationName=(a0?"CtR":"CtL");a1.style.webkitAnimationDuration="1s";a1.style.webkitAnimationName=(a0?"LtC":"RtC");setTimeout(function(a3){a2.removeAttribute("selected");aH=setInterval(p,300);ar(a1,a2)},1000);a2.style.left=(a0?100:-100)+"%";a1.style.left="0%"}function an(a1,a0){a0.style.left="100%";a0.setAttribute("selected","true");clearInterval(aH);a1.style.left="100%";a0.style.left="0%";a1.removeAttribute("selected");aH=setInterval(p,300);ar(a0,a1)}function d(a0,a1){if(!H||ag){return}if(!a1||typeof a1!=="string"||a1.search(/info|warn|confirm/)===-1){a1="info"}if(!U||!o){U=aF("msg");o=aF("msg-p")}o.innerHTML=a0;U.className="";aS(U,"msg "+a1);ag=true;K(true);k=setTimeout(function(){au()},aN*1000)}function au(){if(!U){return}clearTimeout(k);K(false);ag=false}function aI(a0){if(a0){b(true);U.style.webkitAnimationDuration=".3s";U.style.webkitAnimationName="msgIn";U.style.top="0"}else{U.style.webkitAnimationDuration=".3s";U.style.webkitAnimationName="msgOut";U.style.top="-30px";setTimeout(function(){b(false)},1000)}}function R(a1){if(a1){b(true)}var a3=30;a0();var a2=setInterval(a0,10);function a0(){a3-=2;if(a3<=0){a3=0;clearInterval(a2);if(!a1){b(false)}}U.style.top=a1?"-"+a3+"px":"-"+(30-a3)+"px"}}function b(a0){U.style.display=(a0)?"block":"none"}function j(a0){if(a0){a0(false)}d(F.iphone.format_strs.no_connection_message,"warn")}function z(){var a0=document.createElement("div");a0.id="preloader";document.body.appendChild(a0)}function ax(){var a0=window.innerWidth||0,a5=window.innerHeight||0,a3=window.devicePixelRatio||1,a4,a2=new Date(),a1;C=(a0>a5)?true:false;a2.setTime(a2.getTime()+2592000000);a1="; expires="+a2.toGMTString()+"; path=/";a4=""+a0+","+a5+","+a3;document.cookie="vp="+encodeURIComponent(a4)+a1;if(a3>1){document.cookie="rtna=1"+a1}else{document.cookie="rtna=0; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}}function az(a2,a3,a0){var a1=y(a2);if(a3 instanceof Array){a1=a1.concat(a3)}if(a2.method.toLowerCase()==="post"){F.iphone.showPageByHref(a2.action,a1,a2.method,null,a0)}else{F.iphone.showPageByHref(a2.action+(a2.action.match(/\?/)?"&":"?")+a1.join("&"),null,a2.method,null,a0)}}function y(a2){function a1(a3){for(var a4=0;a4<a3.length;++a4){if(a3[a4].name&&((a3[a4].type!=="radio"&&a3[a4].type!=="checkbox")||(a3[a4].type==="radio"&&a3[a4].checked)||(a3[a4].type==="checkbox"&&a3[a4].checked))){a0.push(a3[a4].name+"="+a3[a4].value)}}}var a0=[];a1(a2.getElementsByTagName("input"));a1(a2.getElementsByTagName("select"));a1(a2.getElementsByTagName("textarea"));return a0}function t(a1,a0){while(a1&&(a1.nodeType!=1||a1.localName.toLowerCase()!=a0)){a1=a1.parentNode}return a1}function aZ(a0,a1){var a2=new RegExp("(^|\\s)"+a1+"($|\\s)");return a2.exec(a0.getAttribute("class"))!=null}function aX(a0,a1){var a2=new RegExp("(?:^|\\s+)"+a1+"(?:\\s+|$)");if(!a1||!aZ(a0,a1)){return false}a0.className=a0.className.replace(a2," ");if(aZ(a0,a1)){aX(a0,a1)}a0.className=a0.className.replace(/\s*$/,"");return true}function aS(a0,a1){if(!aZ(a0,a1)){a0.className=[a0.className,a1].join(" ")}}var v=(function(){if(document.getElementsByClassName){v=function(a5,a8,a4){a4=a4||document;var a0=a4.getElementsByClassName(a5),a7=(a8)?new RegExp("\\b"+a8+"\\b","i"):null,a1=[],a3;for(var a2=0,a6=a0.length;a2<a6;a2++){a3=a0[a2];if(!a7||a7.test(a3.nodeName)){a1.push(a3)}}return a1}}else{v=function(bb,be,ba){be=be||"*";ba=ba||document;var a4=bb.split(" "),bd=[],a0=(be==="*"&&ba.all)?ba.all:ba.getElementsByTagName(be),a9,a6=[],a8;for(var a5=0,a1=a4.length;a5<a1;a5++){bd.push(new RegExp("(^|\\s)"+a4[a5]+"(\\s|$)"))}for(var a3=0,bc=a0.length;a3<bc;a3++){a9=a0[a3];a8=false;for(var a2=0,a7=bd.length;a2<a7;a2++){a8=bd[a2].test(a9.className);if(!a8){break}}if(a8){a6.push(a9)}}return a6}}return v})();function aj(a0,a3){var a2=a0.parentNode;var a1=a0;while(a2.parentNode!=document.body){a2=a2.parentNode;a1=a1.parentNode}var a4=document.createElement(a1.localName);a4.innerHTML=a3;a2.removeChild(a1);while(a4.firstChild){a2.appendChild(a4.firstChild)}}function aK(a5){var a7=F.iphone.format_strs.dec_sep;var a1=F.iphone.format_strs.thou_sep;a5=a5.toString();var a6=a5.split(".");var a4=a6[0];var a2=(a6[1])?a7+a6[1]:"";if(a4.length<4){return a4+a2}var a0="";for(var a3=a4.length-1;a3>-1;a3--){if(a3<a4.length-1&&(a4.length-1-a3)%3==0){a0=a1+a0}a0=a4.charAt(a3)+a0}return a0+a2}function aF(a0){return document.getElementById(a0)}})();