var myusrid = '14280625@N03' var maxHeight = 0; var cnt = 0; if (window.location.href.split('#')[1]) { uparms = (window.location.href.split('#')[1].substring(1).split('/')) if (uparms[0] == 'u') { myusrid = uparms[1] } } function morePhotostream(usrid) { hideCopy(); notify(); cnt++; $.get('test.php', { usrid: usrid, uv: 'stream', n: cnt }, appendData); } function moreUser(usrid) { hideCopy(); notify(); cnt++; $.get('test.php', { usrid: usrid, uv: 'fav', n: cnt }, appendData); } function moreUserFirst(usrid) { cnt++; $.get('test.php', { usrid: usrid, uv: 'fav', n: cnt }, appendData); } function appendData(data){ if ((data != 'empty set') && (data != 'server error')) { $(data).appendTo('#wrap'); arrange(); $.scrollTo("#pic" + cnt + "-1", 1000, {offset: -80, axis: "y"}) jqDialog.close(); $(".eachpost").hover( function () { $(this).css('background', '#999') $('#anavul').attr('href', 'http://www.flickr.com/photos/' + $(this).attr('path') + '/' + $(this).attr('picid') + '/') $('#anavlr').attr('href', '/#/u/' + $(this).attr('owner')) $('#anavur').attr('href', $(this).attr('urlm')) $('#anavur').lightBox(); $('#anavll').attr('href', "javascript:addFav('" + $(this).attr('picid') + "')") $('#btns').css( { display: "block" } ) $('#btns').appendTo(this) $('#navlr').css( { top: ($(this).height() - 15) + "px" } ) $('#navll').css( { display: "none" } ) }, function () { $(this).css('background', '#333') $(this).css({ opacity: "1" }) $('#btns').css( { display: "none" } ) $("navul").unbind(); $("navll").unbind(); $("navur").unbind(); $("navlr").unbind(); } ) } else { if (data == 'empty set') { jqDialog.notify('This user has no favorites, sorry.', 5); jqDialog.makeCenter(); } if (data == 'server error') { jqDialog.notify('Couldn\'t connect to flickr, try again.', 5); jqDialog.makeCenter(); } } } function addFav(picad) { hideCopy(); $.get('af.php', { pi: picad }, favData); } function favData(data) { if (data == 'ok') { jqDialog.notify('', 3); jqDialog.makeCenter(); } } function showCopy() { $("#allthisthen").css ( { visibility: "visible", top: ( (($(window).height() / 2) - ( ($("#allthisthen").height()) / 2 ) )) + ($(document).scrollTop()) + 'px', left: ( (($(window).width() / 2) - ( ($("#allthisthen").width()) / 2 ) )) + ($(document).scrollLeft()) + 'px', } ); } function hideCopy() { $("#allthisthen").css("visibility", "hidden") } function notify() { jqDialog.notify('', 3); jqDialog.makeCenter(); } moreUserFirst(myusrid);