Bio
Read More$(function(){ var winHeight = $(window).height(); var bc = $('#breadcrumb').height(); var al = $('#albumDescription').height(); var at = $('#albumNav_top').height(); var p = $('#photos').height(); var c = $('#comment').height(); var smHeight = bc+al+at+p+c; if((smHeight + 200) > winHeight) { $('.customWrapper').css('height',(smHeight+300)+'px'); } else{ $('.customWrapper').css('height',(winHeight-10)+'px'); } }); $(document).ready(function() { $.ajax({ type: "GET", // replace the gallery id with the users gallery id. Example Data=19933137_nLb7B5 url: "hack/feed.mg?Type=gallery&Data=15400381_T34mv8#!i&format=rss200", async: false, dataType: "xml", success: parseXml }); function parseXml(xml) { window.images = []; $(xml).find("item").each(function() { var link = ($(this).find("link").text()); //thumbnail var imgsrc = ($(this).find("guid").text()); //full image fullimages = imgsrc.replace("Th", "X3"); $(this).each(function(){ window.images.push(fullimages); }) }); // The index variable will keep track of which image is currently showing var index = 0; // Call backstretch for the first time, // In this case, I'm settings speed of 600ms for a fadeIn effect between images. $.backstretch(window.images[index], {speed: 700}); // Set an interval that increments the index and sets the new image // Note: The fadeIn speed set above will be inherited setInterval(function() { index = (index >= window.images.length - 1) ? 0 : index + 1; $.backstretch(window.images[index]); }, 4000); var code = ''; for(i = 0; i < window.images.length; i++){ imgThumb = window.images[i].replace("X3", "Ti"); img = window.images[i]; id = "imgClick"+i; code += '
'; } $(code).appendTo('#images'); } $('.clickit').click(function(){ activeItem = this; var bg = $(this).find("img").attr("alt"); $.backstretch(bg, {speed: 300}); }); var $imagesOuter = $('#imageLinks'); var $images = $('#images'); var $imagesW = $images.find("img").length * 106; $images.css("width",$imagesW+ "px"); makeScrollable($imagesOuter, $images); var $winwi = $(window).width(); var $gallwi = $winwi-254; var $galleryOuter = $('#galleryLinks'); $galleryOuter.css("width",$gallwi); var $galleryInner = $('#galleryThumbsInner'); var finalW = $galleryInner.find("img").length * 103.65; $galleryInner.css("width",finalW+ "px"); makeScrollable($galleryOuter, $galleryInner); $(window).resize(function(){ var $imagesOuter = $('#imageLinks'); var $images = $('#images'); var $imagesW = $images.find("img").length * 106; $images.css("width",$imagesW+ "px"); makeScrollable($imagesOuter, $images); var $winwi = $(window).width(); var $gallwi = $winwi-254; var $galleryOuter = $('#galleryLinks'); $galleryOuter.css("width",$gallwi); var $galleryInner = $('#galleryThumbsInner'); var finalW = $galleryInner.find("img").length * 103.65; $galleryInner.css("width",finalW+ "px"); makeScrollable($galleryOuter, $galleryInner); }); $('.glText').css("display", "none"); $('.glImages').bind('mouseenter',function(){ var menu = $(this).find("span"); $(menu).show(); }).bind('mouseleave',function(){ var menu = $(this).find("span"); $(menu).hide(); }); }); $('#images').bind('mouseenter',function(){ $(this).stop().animate({'opacity':'1'}); }).bind('mouseleave',function(){ $(this).stop().animate({'opacity':'0.2'}); }); function makeScrollable($outer, $inner){ var extra = 800; //Get menu width var divWidth = $outer.width(); //Remove scrollbars $outer.css({ overflow: 'hidden' }); //Find last image in container var lastElem = $inner.find('img:last'); $outer.scrollLeft(0); //When user move mouse over menu $outer.unbind('mousemove').bind('mousemove',function(e){ var containerWidth = lastElem[0].offsetLeft + lastElem.outerWidth() + 2*extra; var left = (e.pageX - $outer.offset().left) * (containerWidth-divWidth) / divWidth - extra; $outer.scrollLeft(left); }); } /* * jQuery Backstretch * Version 1.2.1 * http://srobbin.com/jquery-plugins/jquery-backstretch/ * * Add a dynamically-resized background image to the page * * Copyright (c) 2011 Scott Robbin (srobbin.com) * Dual licensed under the MIT and GPL licenses. */ (function(a){a.backstretch=function(k,i,l){function m(c){try{g={left:0,top:0},d=e.width(),b=d/j,b>=e.height()?(h=(b-e.height())/2,f.centeredY&&a.extend(g,{top:"-"+h+"px"})):(b=e.height(),d=b*j,h=(d-e.width())/2,f.centeredX&&a.extend(g,{left:"-"+h+"px"})),a("#backstretch img:last").width(d).height(b).css(g)}catch(o){}typeof c=="function"&&c()}var n={centeredX:!0,centeredY:!0,speed:0},c=a("#backstretch"),f=c.data("settings")||n;c.data("settings");var e="onorientationchange"in window?a(document):a(window),j,d,b,h,g;i&&typeof i=="object"&&a.extend(f,i);a(document).ready(function(){if(k){var b;c.length==0?c=a("
").attr("id","backstretch").css({left:0,top:0,position:"fixed",overflow:"hidden",zIndex:-999999,margin:0,padding:0,height:"100%",width:"100%"}):c.find("img").addClass("deleteable");b=a("").css({position:"absolute",display:"none",margin:0,padding:0,border:"none",zIndex:-999999}).bind("load",function(b){var d=a(this),e;d.css({width:"auto",height:"auto"});e=this.width||a(b.target).width();b=this.height||a(b.target).height();j=e/b;m(function(){d.fadeIn(f.speed,function(){c.find(".deleteable").remove();typeof l=="function"&&l()})})}).appendTo(c);a("body #backstretch").length==0&&a("body").append(c);c.data("settings",f);b.attr("src",k);a(window).resize(m)}});return this}})(jQuery);