if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(elt /*, from*/)
  {
    var len = this.length >>> 0;

    var from = Number(arguments[1]) || 0;
    from = (from < 0)
         ? Math.ceil(from)
         : Math.floor(from);
    if (from < 0)
      from += len;

    for (; from < len; from++)
    {
      if (from in this &&
          this[from] === elt)
        return from;
    }
    return -1;
  };
}

/*! jQuery jCarouselLite - v1.8.1 - 2012-12-16
* http://kswedberg.github.com/jquery-carousel-lite/
* Copyright (c) 2012 Karl Swedberg; Licensed MIT, GPL */
(function(e){function t(e,t){return t.autoStop&&(t.circular?t.autoStop:Math.min(e,t.autoStop))}function n(e){this.id&&(this.id+=e)}e.jCarouselLite={version:"1.8.1",curr:0},e.fn.jCarouselLite=function(r){var i=e.extend(!0,{},e.fn.jCarouselLite.defaults,r),s=Math.ceil,o=Math.abs;return this.each(function(){function J(){return j.slice(I).slice(0,N)}function K(t,n){if(v)return!1;n=n||{};var r=I,s=t>I,o=n.speed||i.speed,u=n.offset||0;return i.beforeStart&&i.beforeStart.call(w,J(),s),j.removeClass(i.activeClass),i.circular?(t>I&&t>F-N?(I%=x,t-=x,E.css(m,-I*p.liSize-u)):t<I&&t<0&&(I+=x,t+=x,E.css(m,-I*p.liSize-u)),I=t+t%1):(t<0?t=0:t>F-C&&(t=F-C),I=t,I===0&&i.first&&i.first.call(this,J(),s),I===F-C&&i.last&&i.last.call(this,J(),s),i.btnPrev&&i.$btnPrev.toggleClass(i.btnDisabledClass,I===0),i.btnNext&&i.$btnNext.toggleClass(i.btnDisabledClass,I===F-C)),B(I,O),e.jCarouselLite.curr=I,r===I&&!n.force?(i.afterEnd&&i.afterEnd.call(w,J(),s),I):(v=!0,g[m]=-(I*p.liSize),E.animate(g,o,i.easing,function(){i.afterEnd&&i.afterEnd.call(w,J(),s),v=!1}),j.eq(I).addClass(i.activeClass),I)}var r,u,a,f,l,c,h,p={div:{},ul:{},li:{}},d=!0,v=!1,m=i.vertical?"top":"left",g={},y=i.vertical?"height":"width",b=this,w=e(this),E=w.find("ul").eq(0),S=E.children("li"),x=S.length,T=i.visible,N=s(T),C=Math.floor(T),k=Math.min(i.start,x-1),L=1,A=0,O={},M={},_={},D=i.vertical?"y":"x",P=i.vertical?"x":"y",H=i.init.call(this,i,S);if(H===!1)return;w.data("dirjc",L),w.data(m+"jc",w.css(m)),i.circular&&(r=S.slice(x-N).clone(!0).each(n),u=S.slice(0,N).clone(!0).each(n),E.prepend(r).append(u),k+=N,A=N);var B=function(t,n){t=s(t);var r,o=(t-A)%x,u=o+C;return n.go&&(r=e(i.btnGo),r.removeClass(i.activeClass).removeClass(i.visibleClass),r.eq(o).addClass(i.activeClass),r.slice(o,o+C).addClass(i.visibleClass),u>r.length&&r.slice(0,u-r.length).addClass(i.visibleClass)),n.pager&&(a.removeClass(i.activeClass),a.eq(s(o/T)).addClass(i.activeClass)),o},j=E.children("li"),F=j.length,I=k;e.jCarouselLite.curr=I;var q=function(e){var t,n,r;return e?(p.div[y]="",p.li={width:"",height:""},p):(t=i.vertical?j.outerHeight(!0):j.outerWidth(!0),n=t*F,r=t*T,p.div[y]=r+"px",p.ul[y]=n+"px",p.ul[m]=-(I*t)+"px",p.li={width:j.width(),height:j.height()},p.liSize=t,p)},R=function(t){var n,r={div:{visibility:"visible",position:"relative",zIndex:2,left:"0"},ul:{margin:"0",padding:"0",position:"relative",listStyleType:"none",zIndex:1},li:{overflow:i.vertical?"hidden":"visible","float":i.vertical?"none":"left"}};t&&(n=q(!0),w.css(n.div),E.css(n.ul),j.css(n.li)),n=q(),i.autoCSS&&(d&&(e.extend(!0,n,r),d=!1),j.css(n.li),E.css(n.ul),w.css(n.div))};R();var U=0,z=t(x,i),W=typeof i.auto=="number"?i.auto:i.scroll,X=function(){b.setAutoAdvance=setTimeout(function(){if(!z||z>U)L=w.data("dirjc"),K(I+L*W),U++,X()},i.timeout)};e.each(["btnPrev","btnNext"],function(t,n){i[n]&&(i["$"+n]=e.isFunction(i[n])?i[n].call(w[0]):e(i[n]),i["$"+n].bind("click.jc",function(e){e.preventDefault();var n=t===0?I-i.scroll:I+i.scroll;return i.directional&&w.data("dirjc",t?1:-1),K(n)}))}),i.circular||(i.btnPrev&&k===0&&i.$btnPrev.addClass(i.btnDisabledClass),i.btnNext&&k+C>=F&&i.$btnNext.addClass(i.btnDisabledClass)),i.btnGo&&(e.each(i.btnGo,function(t,n){e(n).bind("click.jc",function(e){return e.preventDefault(),K(i.circular?T+t:t)})}),O.go=1);if(i.autoPager){f=s(x/T),a=[];for(var V=0;V<f;V++)a.push('<li><a href="#">'+(V+1)+"</a></li>");a.length>1&&(a=e("<ul>"+a.join("")+"</ul>").appendTo(i.autoPager).find("li")),a.find("a").each(function(t){e(this).bind("click.jc",function(e){e.preventDefault();var n=t*T;return i.circular&&(n+=T),K(n)})}),O.pager=1}B(k,O),i.mouseWheel&&w.mousewheel&&w.bind("mousewheel.jc",function(e,t){return t>0?K(I-i.scroll):K(I+i.scroll)}),i.pause&&i.auto&&w.bind("mouseenter.jc",function(){w.trigger("pauseCarousel.jc")}).bind("mouseleave.jc",function(){w.trigger("resumeCarousel.jc")}),i.auto&&X(),e.jCarouselLite.vis=J,w.bind("go.jc",function(e,t,n){typeof t=="undefined"&&(t="+=1");var r=typeof t=="string"&&/(\+=|-=)(\d+)/.exec(t);r?t=r[1]=="-="?I-r[2]*1:I+r[2]*1:t+=k,K(t,n)}).bind("startCarousel.jc",function(e){clearTimeout(b.setAutoAdvance),b.setAutoAdvance=undefined,w.trigger("go","+="+i.scroll),X(),w.removeData("pausedjc").removeData("stoppedjc")}).bind("resumeCarousel.jc",function(e,t){if(b.setAutoAdvance)return;clearTimeout(b.setAutoAdvance),b.setAutoAdvance=undefined;var n=w.data("stoppedjc");if(t||!n)X(),w.removeData("pausedjc"),n&&w.removeData("stoppedjc")}).bind("pauseCarousel.jc",function(e){clearTimeout(b.setAutoAdvance),b.setAutoAdvance=undefined,w.data("pausedjc",!0)}).bind("stopCarousel.jc",function(e){clearTimeout(b.setAutoAdvance),b.setAutoAdvance=undefined,w.data("stoppedjc",!0)}).bind("refreshCarousel.jc",function(e){R(i.autoCSS)}).bind("endCarousel.jc",function(){b.setAutoAdvance&&(clearTimeout(b.setAutoAdvance),b.setAutoAdvance=undefined),i.btnPrev&&i.$btnPrev.addClass(i.btnDisabledClass).unbind(".jc"),i.btnNext&&i.$btnNext.addClass(i.btnDisabledClass).unbind(".jc"),i.btnGo&&e.each(i.btnGo,function(t,n){e(n).unbind(".jc")}),i.circular&&(j.slice(0,N).remove(),j.slice(-N).remove()),e.each([m+"jc","pausedjc","stoppedjc","dirjc"],function(e,t){w.removeData(t)}),w.unbind(".jc")}),h={touchstart:function(e){M.x=e.targetTouches[0].pageX,M.y=e.targetTouches[0].pageY,M[m]=parseFloat(E.css(m)),M.time=+(new Date)},touchmove:function(e){var t=e.targetTouches.length;t===1?(e.preventDefault(),_.x=e.targetTouches[0].pageX,_.y=e.targetTouches[0].pageY,g[m]=M[m]+(_[D]-M[D]),E.css(g)):_=M},touchend:function(e){if(!_.x)return;var t=M[D]-_[D],n=o(t),r=n>i.swipeThresholds[D],s=o(M[P]-_[P])<i.swipeThresholds[P],u=+(new Date)-M.time,a=u<i.swipeThresholds.time,f=t>0?"+=":"-=",l=f+i.scroll,c={force:!0};a&&r&&s?c.speed=i.speed/2:!a&&n<p.liSize/2||!r||a&&!s?l="+=0":!a&&n>p.liSize/2&&(l=Math.round(n/p.liSize),l=f+(l>i.visible?i.visible:l),c.offset=t),w.trigger("go.jc",[l,c]),_={}}},"ontouchend"in document&&i.swipe&&w.bind("touchstart touchmove touchend",function(e){e=e.originalEvent,h[e.type](e)}),i.responsive&&(c=i.autoCSS,e(window).bind("resize",function(e){c&&(E.width(E.width()*2),c=!1),clearTimeout(l),l=setTimeout(function(){w.trigger("refreshCarousel"),c=i.autoCSS},100)}))}),this},e.fn.jCarouselLite.defaults={autoCSS:!0,btnPrev:null,btnNext:null,btnGo:null,autoPager:null,btnDisabledClass:"disabled",activeClass:"active",visibleClass:"vis",mouseWheel:!1,speed:200,easing:null,timeout:4e3,auto:!1,directional:!1,autoStop:!1,pause:!0,vertical:!1,circular:!0,visible:3,start:0,scroll:1,responsive:!1,swipe:!0,swipeThresholds:{x:80,y:120,time:150},init:function(){},first:null,last:null,beforeStart:null,afterEnd:null}})(jQuery);

/*
 * version: 3.0.0
 * package: OrangeBox
 * author: David Paul Hamilton - http://davidpaulhamilton.net/orangebox
 * copyright: Copyright (c) 2012 David Hamilton / DavidPaulHamilton.net All rights reserved.
 * license: GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

if(typeof oB!=='undefined'){console.log('OrangeBox: Variable "oB", used by OrangeBox, is already defined');}else{var oB;(function($){oB={gallery:[],settings:{autoplay:false,searchTerm:'lightbox',fadeControls:false,keyboardNavigation:true,orangeControls:false,showClose:true,showDots:false,showNav:true,addThis:true,addThisServices:'twitter,facebook,digg,delicious,more',notFound:'Not Found',overlayOpacity:0.95,contentBorderWidth:4,contentRoundedBorder:true,contentMinSize:[100,200],contentMaxSize:[0.75,0.75],videoAspect:[390,640],fadeTime:200,slideshowTimer:3000,streamItems:10,logging:false,checkAlias:true},methods:{init:function(o){function checkURL(searchTerm){if(oB.ourl.match(/#\..{1,}\.facebook/)){oB.ourl=oB.ourl.substr(0,oB.ourl.search(/#\..{1,}\.facebook/));}
    if(oB.ourl.match(/^#\w{1,}$/)&&$('#'+oB.ourl).length>0){oB.methods.create($('#'+oB.ourl));}else{$(searchTerm).each(function(){var href=$(this).attr('href');href=href.replace(/\//gi,'').replace(/\./gi,'').replace(/:/gi,'').replace(/\?/gi,'').replace(/&/gi,'').replace(/\=/gi,'').replace(/#/gi,'');if(href.indexOf(oB.ourl)!==-1){oB.methods.create($(this));return false;}});}}
    if(!$('#ob_content').length){if(o){$.extend(oB.settings,o);}
        var searchTerm='a[data-ob*=lightbox], area[data-ob*=lightbox], a[rel*=lightbox], area[rel*=lightbox]';if(oB.settings.searchTerm!==""){searchTerm='a[data-ob*='+oB.settings.searchTerm+'], area[data-ob*='+oB.settings.searchTerm+'], a[rel*='+oB.settings.searchTerm+'], area[rel*='+oB.settings.searchTerm+']';}
        oB.windowURL=window.location.href;if(oB.windowURL.match(/(&|\?)orangebox=/)){oB.windowURL=oB.windowURL.substr(0,oB.windowURL.search(/(&|\?)orangebox=/));}
        oB.ourl=oB.methods.getUrlVars()['orangebox'];try{document.createEvent("TouchEvent");oB.touch=true;oB.methods.logit('Touch device detected',true);}catch(e){oB.touch=false;oB.methods.logit('Touch device not detected',true);}
        if(oB.settings.orangeControls===true&&!$().orangeControls){oB.methods.logit('Connection with OrangeControls failed');oB.settings.orangeControls=false;}
        oB.browser=$.browser;if(oB.settings.addThis){$.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dd42f2b5b9fc332',function(){if(oB.ourl){checkURL(searchTerm);}});}else if(oB.ourl){checkURL(searchTerm);}
        return this.each(function(){oB.methods.setupData($(this));});}
    return false;},setupData:function(o){var u=o.attr('href'),c=false,s=[0,0],i=0,t="",g=false,rel=o.attr('data-ob'),id,alias=false,unique=true,cap=o.attr('data-ob_caption');if(!rel||rel===""){rel=o.attr('rel');o.attr('data-ob',rel);}
    if(rel&&rel.match(/\[/)){g=rel.substring(rel.indexOf("[")+1,rel.indexOf("]")).replace(/ /g,"_");$.each(oB.gallery,function(){if(this.name===g){unique=false;if(oB.settings.checkAlias){$.each(this.objects,function(){if(this.data('oB')&&this.data('oB').href===o.attr('href')){oB.methods.logit('Object already added: '+u,true);alias=this;}});}}});if(unique){oB.gallery.push({name:g,objects:[]});}}
    if(oB.settings.checkAlias&&(o.data('oB')||alias)){oB.methods.logit('Object already added: '+u,true);o.click(function(e){e.preventDefault();oB.methods.create(alias);});}else if(u){if(typeof o.attr('title')!=="undefined"){t=o.attr('title');}
        if(typeof o.attr('data-ob_height')!=='undefined'){s[0]=parseInt(o.attr('data-ob_height'),10);}
        if(typeof o.attr('data-ob_width')!=='undefined'){s[1]=parseInt(o.attr('data-ob_width'),10);}
        if(typeof o.attr('data-ob_iframe')!=='undefined'&&o.attr('data-ob_iframe')==="true"){c="iframe";}else if(u.match(/\.(?:jpg|jpeg|bmp|png|gif)/i)){c="image";}else if(u.match(/\.pdf/i)){c="pdf";}else if(u.match(/\.swf/i)){c="flash";}else if(u.match(/^http:\/\/api\.flickr\.com\/services\/feeds\/.{1,}\.gne\?id=\d{1,}@.{1,}&lang=.{1,}&format=rss_200/i)){c="flickr";u=u.replace('rss_200','json')+"&jsoncallback=?";if(!rel.match(/\[/)){g='flickr'+newDate.getTime();}
            $.getJSON(u,function(data){$.each(data.items,function(index,item){var item_href=item.media.m.replace('_m.jpg','.jpg'),delay="";if(typeof o.attr('data-ob_delayTimer')!=="undefined"&&o.attr('data-ob_delayTimer')!=="0"){delay='data-ob_delayTimer="'+o.attr('data-ob_delayTimer')+'"';}
                if(index===0){o.attr({href:item_href,"data-ob_share":"false",caption:cap,title:item.title});oB.methods.setupData(o);}else if(index<oB.settings.streamItems){oB.methods.setupData($('<a href="'+item_href+'" data-ob_linkText="'+o.attr('data-ob_linkText')+'" data-ob_link="'+o.attr('data-ob_link')+'" data-ob_linkTarget="'+o.attr('data-ob_linkTarget')+'" '+delay+' data-ob_share="false" title="'+item.title+'" data-ob="lightbox['+g+']"></a>'));}else{return false;}});});}else if(u.match(/^https:\/\/picasaweb\.google\.com\/data\/feed\/base\//i)){c="picasa";u=u.replace('/base/','/api/').replace('alt=rss','alt=json-in-script')+'&max-results='+oB.settings.streamItems+'&callback=?';if(!rel.match(/\[/)){g='picasa'+newDate.getTime();}
            $.ajax({url:u,dataType:'json',success:function(data){$.each(data.feed.entry,function(index,item){var picasaSrc,delay="";if(typeof o.attr('data-ob_delayTimer')!=="undefined"&&o.attr('data-ob_delayTimer')!=="0"){delay='data-ob_delayTimer="'+o.attr('data-ob_delayTimer')+'"';}
                if(item.content){picasaSrc=item.content.src;}else if(item.media$group.media$content[0]){picasaSrc=item.media$group.media$content[0].url;}else{return false;}
                if(cap===""){cap=item.summary.$t;}
                if(index===0){o.attr({href:picasaSrc,"data-ob_share":"false","data-ob_caption":cap,title:item.title.$t});oB.methods.setupData(o);}else if(index<oB.settings.streamItems){oB.methods.setupData($('<a href="'+picasaSrc+'" data-ob_caption="'+item.summary.$t+'" data-ob_linkText="'+o.attr('data-ob_linkText')+'" data-ob_link="'+o.attr('data-ob_link')+'" data-ob_linkTarget="'+o.attr('data-ob_linkTarget')+'" '+delay+' data-ob_share="false" title="'+item.title.$t+'" data-ob="lightbox['+g+']"></a>'));}else{return false;}});}});}else if(u.match(/^http:\/\/\w{0,3}\.?youtube\.\w{2,3}\/watch\?v=[\w\-]{11}/i)){id=u.match(/\?v=[\w\-]{11}/)[0].substring(3);c="youtube";}else if(u.match(/^http:\/\/\w{0,3}\.?youtu\.be\/[\w\-]{11}$/i)){id=u.match(/youtu\.be\/[\w\-]{11}$/)[0].substring(9);c="youtube";}else if(u.match(/^http:\/\/\w{0,3}\.?youtube\.\w{2,3}\/embed\/[\w\-]{11}$/i)){id=u.match(/\/embed\/[\w\-]{11}$/)[0].substring(7);c="youtube";}else if(u.match(/^http:\/\/\w{0,3}\.?vimeo\.com\/\d{1,10}$/i)){id=u.match(/vimeo\.com\/\d{1,}/)[0].substring(10);c="vimeo";}else if(u.match(/^http:\/\/\w{0,3}\.?viddler\.com\/(?:simple|player)\/\w{1,10}$/i)){id=u.match(/viddler\.com\/(player|simple)\/\w{1,}/)[0].substring(19);c="viddler";}else if(u.match(/^#\w{1,}$/i)){c="inline";}else{oB.methods.logit('Unsupported Media: '+u);}
        if(c&&c!=="flickr"&&c!=="picasa"){$.each(oB.gallery,function(){if(this.name===g){i=this.objects.push(o)-1;}});o.data('oB',{size:s,css:'',gallery:g,index:i,contentType:c,href:u,title:t,linkText:o.attr('data-ob_linkText'),"link":o.attr('data-ob_link'),linkTarget:o.attr('data-ob_linkTarget'),caption:cap,share:o.attr('data-ob_share'),delayTimer:o.attr('data-ob_delayTimer'),id:id}).click(function(e){e.preventDefault();oB.methods.create(o);});}}else{oB.methods.logit('Object has no "href" attribute');}},create:function(obj,o){function handleEscape(e){if(e.keyCode===27&&oB.progress===null){oB.methods.destroy();}else if(e.keyCode===37&&oB.progress===null){oB.methods.slideshowPause();oB.methods.navigate(-1);}else if(e.keyCode===39&&oB.progress===null){oB.methods.slideshowPause();oB.methods.navigate(1);}}
    if(!$('#ob_content').length){if(o){$.extend(oB.settings,o);}
        if(!obj){obj=(this instanceof jQuery)?this:$(this);}
        if(!obj.data('oB')){oB.methods.setupData(obj);}
        if(obj.data('oB').contentType){oB.currentGallery=[];oB.playing=oB.settings.autoplay;oB.progress=null;oB.docHeight=$(document).height();oB.docWidth=$(document).width();$.each(oB.gallery,function(){if(this.name===obj.data('oB').gallery){oB.currentGallery=this.objects;return false;}});var overlay=$('<div id="ob_overlay"></div>').css({"opacity":oB.settings.overlayOpacity,"height":oB.docHeight,"min-height":oB.docHeight,"min-width":oB.docWidth}),container=$('<div id="ob_container"></div>'),ob_content=$('<div id="ob_content"></div>').click(function(e){e.stopPropagation();}).css("border-width",oB.settings.contentBorderWidth);if(oB.settings.contentRoundedBorder){ob_content.css({"-moz-border-radius":oB.settings.contentBorderWidth,"border-radius":oB.settings.contentBorderWidth});}
            if(oB.touch){container.css("min-width",oB.docWidth);}
            if(oB.settings.addThis===true&&typeof addthis==='undefined'){oB.methods.logit('Connection with addThis failed');oB.settings.addThis=false;}
            if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});}
            $("body").append(overlay.fadeIn(oB.settings.fadeTime).click(function(){oB.methods.destroy();})).append(container.click(function(){oB.methods.destroy();}));$("#ob_container").append('<div id="ob_float"></div>').append(ob_content);if(oB.settings.keyboardNavigation){$(document).keydown(handleEscape);}
            oB.methods.showContent(obj,true);}}},showContent:function(obj,initial){var href=obj.data('oB').href,title=obj.data('oB').title,contentType=obj.data('oB').contentType,content,ob_caption='',ob_caption_text='',tag=href,navRight=$('<a class="ob_nav" id="ob_right"><span class="ob_controls" id="ob_right-ico"></span></a>').click(function(e){if(oB.progress===null){oB.methods.slideshowPause();e.stopPropagation();oB.methods.navigate(1);}}),navLeft=$('<a class="ob_nav" id="ob_left"><span class="ob_controls" id="ob_left-ico"></span></a>').click(function(e){if(oB.progress===null){oB.methods.slideshowPause();e.stopPropagation();oB.methods.navigate(-1);}}),dotnav=$('<ul id="ob_dots"></ul>').click(function(e){e.stopPropagation();}),ob_link;if(obj.data('oB').caption){ob_caption_text=$.trim(obj.data('oB').caption);if(ob_caption_text!==""){ob_caption=$('<div id="ob_caption"></div>').click(function(e){e.stopPropagation();}).append('<p>'+ob_caption_text+'</p>');}}
    tag=tag.replace(/\//gi,'').replace(/\./gi,'').replace(/:/gi,'').replace(/\?/gi,'').replace(/&/gi,'').replace(/\=/gi,'').replace(/#/gi,'');ob_link=(oB.windowURL.match(/\?/))?oB.windowURL+"&orangebox="+tag:oB.windowURL+"?orangebox="+tag;oB.currentIndex=obj.data('oB').index;oB.methods.showLoad();$('#ob_content').removeClass().addClass('content'+oB.currentIndex);if(oB.settings.showDots){$.each(oB.currentGallery,function(x){dotnav.append($('<li id="ob_dot'+x+'"></li>').click(function(e){e.stopPropagation();if(!$(this).hasClass('current')&&oB.progress===null){oB.methods.slideshowPause();var x=$(this).attr('id').substr(6);dotnav.find("li").removeClass('current');$(this).addClass('current');oB.methods.navigate("",x);}}));});}
    if(oB.currentGallery.length>1){if(oB.settings.orangeControls){$(document).orangeControls();}
        if(oB.settings.showDots){$('#ob_content').append(dotnav);}}
    if(oB.settings.showClose){$('#ob_content').append($('<div title="close" class="ob_controls ob_cs" id="ob_close"></div>').click(function(e){e.stopPropagation();oB.methods.destroy();}));}
    function setControls(){if(oB.settings.showDots){$('#ob_dots').find('li').each(function(){var i='ob_dot'+obj.data('oB').index;if($(this).attr('id')===i){$(this).addClass('current');}else{$(this).removeClass('current');}});}
        if(oB.settings.showNav){if(oB.currentGallery[oB.currentIndex+1]){$('#ob_content').append(navRight);}
            if(oB.currentGallery[oB.currentIndex-1]){$('#ob_content').append(navLeft);}}
        clearTimeout(oB.controlTimer);if(oB.settings.fadeControls&&!oB.touch){if(!oB.playing||initial){$('.ob_controls').fadeIn(oB.settings.fadeTime);}
        else{$('.ob_controls').hide();}
            oB.controlTimer=setTimeout(function(){$('.ob_controls').fadeOut(oB.settings.fadeTime);},1200);$(document).mousemove(function(event){$('.ob_controls').fadeIn(oB.settings.fadeTime);clearTimeout(oB.controlTimer);oB.controlTimer=setTimeout(function(){if(!$(event.target).hasClass('ob_controls')&&!$(event.target).parent().hasClass('ob_controls')){oB.controlTimer=setTimeout(function(){$('.ob_controls').fadeOut(oB.settings.fadeTime);},1200);}},20);});}else{$('.ob_controls').fadeIn(oB.settings.fadeTime);}}
    function setWindowMargin(w){var copied_elem=$('<div>'+title+'</div>').css({visibility:"hidden",display:"block",position:"absolute",width:w-40,"line-height":$('#ob_title').css('line-height'),"font-size":$('#ob_title').css('font-size')});$("body").append(copied_elem);$('#ob_content').css('margin-top',copied_elem.height()+44);$('#ob_title').css({'margin-top':-copied_elem.height()-oB.settings.contentBorderWidth-4,'margin-right':-oB.settings.contentBorderWidth});copied_elem.remove();}
    function adjustModalProperties(){var size=[content.outerHeight(),content.outerWidth()],dim;if(obj.data('oB').css[0]){size[0]=obj.data('oB').css[0];}
        if(obj.data('oB').css[1]){size[1]=obj.data('oB').css[1];}
        if(content.attr('id')!=="ob_error"&&size[0]<oB.settings.contentMinSize[0]){size[0]=oB.settings.contentMinSize[0];}
        if(size[1]<oB.settings.contentMinSize[1]){size[1]=oB.settings.contentMinSize[1];}
        dim=[Math.round(size[0]),Math.round(size[1])];if(contentType!=="error"){setWindowMargin(dim[1]);}else{dim[1]=250;}
        $('#ob_float').css({"margin-bottom":-(dim[0]+(oB.settings.contentBorderWidth*2)+44)/2});$('#ob_content').css({"min-height":dim[0],"width":dim[1]});}
    function buildWindow(){var delayTimer=(obj.data('oB').delayTimer)?parseInt(obj.data('oB').delayTimer,10)+parseInt(oB.settings.slideshowTimer,10):oB.settings.slideshowTimer,target='target="_blank"',addThis=$('<a id="ob_share" class="addthis_button_compact"></a>'),shareHTML=$('<span class="at300bs at15nc at15t_compact"></span>').css('display','inline-block'),p=$(window).scrollTop();if(p===0){p=$(document).scrollTop();}
        if(p===0){p=window.pageYOffset;}
        $("#ob_container").css("margin-top",p);$('#ob_content').append('<div id="ob_title"></div>').append(content.addClass('ob_contents'));if(contentType!=="error"){$('#ob_content').append(ob_caption);if(obj.data('oB').link&&obj.data('oB').link!==""&&obj.data('oB').link!=="undefined"){if(obj.data('oB').linkTarget==="_self"){target='target="_self"';}
            title=(obj.data('oB').linkText&&obj.data('oB').linkText!=="undefined")?title+' <a href="'+obj.data('oB').link+'" '+target+' >'+obj.data('oB').linkText+'</a>':title+' <a href="'+obj.data('oB').link+'" '+target+' >'+obj.data('oB').link+'</a>';}
            if(oB.settings.addThis&&obj.data('oB').share!=="false"){addThis.addClass("ob_share");title=$.trim(title);if(title===""){title="&nbsp;";}
                $('#ob_title').append(addThis);addthis.button('.ob_share',{services_compact:oB.settings.addThisServices,ui_offset_left:-244,ui_offset_top:4},{url:ob_link,title:title});$('#ob_share').html('').append(shareHTML);}
            $('#ob_title').prepend(title).click(function(e){e.stopPropagation();});setControls();if(obj.data('oB').share!=="false"){$(document).trigger('oB_init',ob_link);oB.methods.logit('ID:'+oB.currentIndex+' href:"'+href+'" link:"'+ob_link+'"',true);}else{$(document).trigger('oB_init',"");oB.methods.logit('ID:'+oB.currentIndex+' href:"'+href+'"',true);}
            oB.progress=null;if(oB.playing){oB.slideshowTimer=setTimeout(function(){oB.methods.navigate(1);},delayTimer);}}else{oB.methods.logit('Could not find file');}
        oB.methods.showLoad(1);$('#ob_content').fadeIn(oB.settings.fadeTime,function(){$('#ob_overlay').css("height",$(document).height());});adjustModalProperties();}
    function throwError(){content=$('<div id="ob_error">'+oB.settings.notFound+'</div>');$('#ob_content').append(content.addClass('ob_contents'));contentType="error";clearTimeout(oB.controlTimer);clearTimeout(oB.slideshowTimer);clearTimeout(oB.scrollTimer);$(document).unbind("keydown").unbind("mousemove");buildWindow();}
    function showiFrame(){var dim=oB.methods.getSize(obj,[0,0]);obj.data('oB').css=dim;content=$('<div id="ob_iframe"><iframe allowTransparency="true" height="100%" width="100%" scrolling="auto" type="text/html" frameborder="0" hspace="0" src="'+href+'"></iframe></div>').css("width",dim[1]);if(dim[0]!==0){content.css("height",dim[0]);}
        buildWindow();}
    function showInline(){var dim=oB.methods.getSize(obj,[0,0]),inline_content=$('<div class="inline_content"></div>'),s=obj.data('oB').size,clone,copied_elem,copied_content,height;if(href.match(/\?/)){href=href.substr(0,href.indexOf("?"));}
        if($(href).length&&$(href).html()!==""){if(s[0]===0){clone=$(href).clone();clone.css('display','block');copied_elem=$('<div id="ob_inline"></div>').css({visibility:"hidden",display:"block",position:"absolute",width:dim[1]});copied_content=$('<div class="inline_content"></div>').append(clone);copied_elem.append(copied_content);$("body").append(copied_elem);height=copied_elem.height();copied_content.empty().remove();copied_elem.remove();if(dim[0]>height){dim[0]=height;}}
            obj.data('oB').css=dim;content=$('<div id="ob_inline"></div>').css({"width":dim[1]});$(href).parent().addClass('ob_inline_content_holder');if($(href).is(':visible')){$(href).appendTo(inline_content).addClass('ob_inline_content');}else{$(href).appendTo(inline_content).addClass('ob_inline_content').addClass('ob_inline_hide').show();}
            content.append(inline_content);if(dim[0]!==0){content.css("height",dim[0]);}
            buildWindow();}else{throwError();}}
    function showVideo(){var dim=oB.methods.getSize(obj,[0,0]),src;switch(contentType){case"youtube":src='http://www.youtube.com/embed/'+obj.data('oB').id+'?autoplay=1&fs=1&modestbranding=1&rel=0&showsearch=0&wmode=transparent';break;case"vimeo":src='http://player.vimeo.com/video/'+obj.data('oB').id+'?title=0&byline=0&portrait=0&autoplay=1&wmode=transparent';break;case"viddler":src='http://cdn.static.viddler.com/flash/publisher.swf?key='+obj.data('oB').id+'&title=0&byline=0&portrait=0&autoplay=1&wmode=transparent';break;}
        obj.data('oB').css=dim;content=$('<div id="ob_iframe"><iframe allowTransparency="true" id="ob_video" width="100%" height="100%" type="text/html" frameborder="0" hspace="0" scrolling="no" src="'+src+'"></iframe></div>').css({"height":dim[0],"width":dim[1],"background-color":"#000000"});buildWindow();}
    function showFlash(){var dim=oB.methods.getSize(obj,[0,0]);obj.data('oB').css=dim;content=$('<div id="ob_video">'+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+dim[1]+'" height="'+dim[0]+'" id="ob_flash_content" align="middle">'+'<param name="movie" value="'+href+'"/><param name="wmode" value="transparent"/><param name="allowFullScreen" value="true"/>'+'<embed name="ob_flash_content" flashVars="playerVars=autoPlay=yes" src="'+href+'" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" allowFullScreen="true" allowScriptAccess="always" width="'+dim[1]+'" height="'+dim[0]+'" type="application/x-shockwave-flash"></embed>'+'</object></div>').css({"height":dim[0],"width":dim[1]});buildWindow();}
    function showImage(){var img=new Image();content=$(img);content.load(function(){var oSize=[img.height,img.width],sSize=[0,0],running=false,dim,margin;if(obj.data('oB').size){sSize=obj.data('oB').size;}
        if(sSize[0]>0&&sSize[1]===0){sSize[1]=oSize[1]/oSize[0]*sSize[0];}else if(sSize[1]>0&&sSize[0]===0){sSize[0]=oSize[0]/oSize[1]*sSize[1];}else if(sSize[0]===0&&sSize[1]===0){sSize=[oSize[0],oSize[1]];}
        obj.data('oB').size=sSize;dim=oB.methods.getSize(obj,[0,0]);margin=(oB.settings.contentMinSize[0]/2)-(dim[0]/2);obj.data('oB').css=dim;$('#ob_content').unbind('click').click(function(e){e.stopPropagation();var fullDim=oB.methods.getSize(false,oSize,true),newDim=oB.methods.getSize(obj,[0,0]),setDim,p=$(window).scrollTop();if(p===0){p=$(document).scrollTop();}
            if(p===0){p=window.pageYOffset;}
            if(!running&&dim[0]<oSize[0]&&fullDim[1]!==newDim[1]){$('#ob_title').stop().hide();running=true;$('.ob_controls').fadeOut(50);if($(this).hasClass('expanded')||fullDim[0]<$('#ob_image').height()){$(this).removeClass('expanded');setDim=newDim;}else{$(this).addClass('expanded');setDim=fullDim;}
                setWindowMargin(setDim[1]);$("#ob_container").animate({"margin-top":p},400);$('#ob_float').animate({"margin-bottom":-(setDim[0]+(oB.settings.contentBorderWidth*2)+44)/2},400);$('#ob_content').animate({"min-height":setDim[0],"width":setDim[1]},400);$('#ob_image').animate({"height":setDim[0],"width":setDim[1]},400,function(){running=false;$('.ob_controls').fadeIn(50);$('#ob_title').stop().fadeIn(50);});}});if(dim[0]<oB.settings.contentMinSize[0]){content.css("margin-top",margin);}
        content.css({"height":dim[0],"width":dim[1]});buildWindow();}).error(function(){throwError();}).attr({src:href,id:'ob_image'});}
    switch(contentType){case"iframe":case"pdf":showiFrame();break;case"image":case"flickr":case"picasa":showImage();break;case"inline":showInline();break;case"youtube":case"vimeo":case"viddler":showVideo();break;case"flash":showFlash();break;default:oB.methods.logit('Unsupported Media: '+href);return false;}},createCustom:function(content,o){if(o){$.extend(oB.settings,o);}
    if(content.href==="undefined"||content.href===""){return false;}
    var obj=$('<a href="'+content.href+'"></a>'),html;if(content.title){obj.attr('title',content.title);}
    if(content.caption){obj.attr('data-ob_caption',content.caption);}
    if(content.link){obj.attr('data-ob_link',content.link);}
    if(content.linkText){obj.attr('data-ob_linkText',content.linkText);}
    if(content.linkTarget){obj.attr('data-ob_linkTarget',content.linkTarget);}
    if(content.delay){obj.attr('data-ob_delayTimer',content.delay);}
    obj.attr('data-ob_share','false');if(content.html){html=$(content.html).css('display','none');$(body).append(html);}
    if(content.gallery){obj.attr('data-ob',oB.settings.searchTerm+'['+content.gallery+']');}
    else{obj.attr('data-ob',oB.settings.searchTerm);}
    oB.methods.setupData(obj);oB.methods.create(obj);},navigate:function(d,i,o){if(o){$.extend(oB.settings,o);}
    if(!i){if(d===1){i=oB.currentIndex+1;}else if(d===-1){i=oB.currentIndex-1;}}
    if(oB.currentGallery[i]){oB.progress=true;$(document).trigger('oB_navigate',[i]);$('#ob_content').fadeOut(oB.settings.fadeTime,function(){if($('#ob_iframe').length>0){$('#ob_iframe iframe').attr('src','about:blank');}
        if($('#ob_inline').length){$('#ob_inline').find('.ob_inline_content').appendTo('.ob_inline_content_holder').removeClass('ob_inline_content');$('.ob_inline_hide').hide().removeClass('ob_inline_hide');$('.ob_inline_content_holder').removeClass('ob_inline_content_holder');}
        $(this).removeClass('expanded').css({"min-height":''}).empty();oB.delayTimer=oB.currentGallery[i].data('oB').delayTimer;oB.methods.showContent(oB.currentGallery[i]);});}else{oB.progress=null;}
    if(!oB.currentGallery[i+1]){oB.methods.slideshowPause();}},slideshowPlay:function(){$(document).trigger('oB_play');oB.playing=true;if(oB.currentGallery[parseInt($('#ob_content').attr('class').substr(7),10)+1]){oB.methods.navigate(1);}else{oB.methods.navigate(0,0);}},slideshowPause:function(){if(oB.playing){$(document).trigger('oB_pause');oB.playing=false;clearTimeout(oB.slideshowTimer);}},showLoad:function(x){var ob_load=$('<div id="ob_load"></div>').hide();if($('#ob_load').length>0||x){clearTimeout(oB.loadTimer);$('#ob_load').remove();}else{clearTimeout(oB.loadTimer);$("body").append(ob_load);oB.loadTimer=setTimeout(function(){$('#ob_load').fadeIn();},600);}},destroy:function(o,x){if($('#ob_content').length>0){$(document).trigger('oB_closing');if(o){$.extend(oB.settings,o);}
    oB.methods.showLoad(1);clearTimeout(oB.controlTimer);clearTimeout(oB.slideshowTimer);clearTimeout(oB.scrollTimer);if(oB.settings.orangeControls){$(document).orangeControls('destroy',oB.settings.fadeTime);}
    $(document).unbind("keydown").unbind("mousemove");$('#ob_container').stop().fadeOut(oB.settings.fadeTime,function(){if($('#ob_inline').length){$('#ob_inline').find('.ob_inline_content').appendTo('.ob_inline_content_holder').removeClass('ob_inline_content');$('.ob_inline_hide').hide().removeClass('ob_inline_hide');$('.ob_inline_content_holder').removeClass('ob_inline_content_holder');}
        if($('#ob_iframe').length>0){$('#ob_iframe iframe').attr('src','about:blank');}
        $(this).empty().remove();$(document).trigger('oB_closed');if(x&&$.isFunction(x)){x();}});$('#ob_overlay').fadeOut(oB.settings.fadeTime,function(){$(this).remove();if($('#ob_container').length>0){$('#ob_container').remove();}});}},getSize:function(obj,s,noMaxHeight){var ww=$(window).width(),wh=$(window).height(),mSize=[wh-44,ww-44],m,a,c;if(oB.docWidth>ww){mSize[1]=oB.docWidth-44;}
    if(oB.settings.showNav){mSize[1]-=120;}
    if(obj){s[0]=obj.data('oB').size[0];s[1]=obj.data('oB').size[1];m=oB.settings.contentMaxSize;a=oB.settings.videoAspect;c=obj.data('oB').contentType;if(c==="youtube"||c==="vimeo"||c==="viddler"||c==="flash"){if(s[0]>0&&s[1]===0){s[1]=a[1]/a[0]*s[0];}else if(s[1]>0&&s[0]===0){s[0]=a[0]/a[1]*s[1];}else if(s[0]===0&&s[1]===0){s=a;}}
        if(c==="iframe"||c==="pdf"){mSize[0]-=120;}
        if(m[0]===0&&c!=="iframe"&&c!=="pdf"){mSize[0]=0;}else if(m[0]>1&&m[0]<mSize[0]){mSize[0]=m[0];}else if(m[0]>0&&m[0]<=1){mSize[0]=Math.round(mSize[0]*m[0]);}
        if(m[1]>1&&m[1]<mSize[1]){mSize[1]=m[1];}else if(m[1]>0&&m[1]<=1){mSize[1]=Math.round(mSize[1]*m[1]);}
        if(s[1]<=1){s[1]=mSize[1];}
        if(s[0]===0&&mSize[0]!==0){s[0]=mSize[0];}}
    if(!noMaxHeight&&mSize[0]&&s[0]>mSize[0]){s[1]=s[1]*mSize[0]/s[0];s[0]=mSize[0];}
    if(s[1]>mSize[1]){s[0]=s[0]*mSize[1]/s[1];s[1]=mSize[1];}
    return[Math.round(s[0]),Math.round(s[1])];},getUrlVars:function(){var i,vars=[],hash,hashes=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');for(i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars[hash[0]]=hash[1];}
    return vars;},logit:function(m,d){if(d&&oB.settings.logging==="debug"){console.log('OrangeBox: '+m);}else if(!d&&oB.settings.logging){console.log('OrangeBox: '+m);}}}};$.fn.orangeBox=function(method){if(method==="showContent"||method==="getSize"||method==="getUrlVars"||method==="logit"){oB.methods.logit(method+' cannot be called externally');}else if(oB.methods[method]){return oB.methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return oB.methods.init.apply(this,arguments);}else{oB.methods.logit(method+' does not exist in OrangeBox');}};})(jQuery);}
jQuery(document).ready(function($){var searchTerm='a[data-ob*=lightbox], area[data-ob*=lightbox], a[rel*=lightbox], area[rel*=lightbox]';if(typeof orangebox_vars!=="undefined"){$.extend(oB.settings,orangebox_vars);}
    if(oB.settings.searchTerm!==""){searchTerm='a[data-ob*='+oB.settings.searchTerm+'], area[data-ob*='+oB.settings.searchTerm+'], a[rel*='+oB.settings.searchTerm+'], area[rel*='+oB.settings.searchTerm+']';}
    $(searchTerm).orangeBox();$(document).trigger('oB_ready');});

/******************************************************
	* jQuery plug-in
	* So So Social Activity Feed
	* Developed by J.P. Given (http://johnpatrickgiven.com)
	* Useage: anyone so long as credit is left alone
******************************************************/

// Icons via Buddycon Icon Set by Webdesigner Depot & Orman Clark http://www.webdesignerdepot.com and www.ormanclark.com

;(function ( $, window, document ) {
    
	var pluginName = 'soSoSocial',
	obj = null,
	defaults = {
		limit: 3,
		bgTwitter: '/images/fx-site-images/icon-tw.png',
		bgFacebook: '/images/fx-site-images/icon-fb.png',
		bgDefault:  '/images/fx-site-images/icon-fb.png'
	};

	function Plugin( element, options ) {
		obj = this;
		this.contentCount = 0;
		this.arrayCheck = [];
		this.contentArray = [];
		this.html = '';
		this.element = element;
		this.options = $.extend( {}, defaults, options) ;

		this._defaults = defaults;
		this._name = pluginName;

		this.init();
	}

    Plugin.prototype.init = function () {
		jQuery.each(this.options.feeds, function(i,o) {
			
			$.jsonp({
				url: 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%22' + encodeURIComponent(o) + '%22&format=json&callback=?',
				success: function(res) {
					// console.log(res.query.results.rss.channel.item);
					
					if (res.query.results != null) {
						jQuery.each(res.query.results.rss.channel.item, function(i, o) {
							// console.log(o);

							var desc = (
								(o.commentRss != undefined && o.commentRss.indexOf('feeds.delicious.com') > -1) || 
								(o.link != undefined && o.link.indexOf('posterous.com'))) 
								? o.title : o.description;

							// If the description is an array (flickr!) then grab the zero element
							if ($.isArray(desc)) { desc = desc[0]; }

							// For twitter, dynamically make all URLs clickable
							desc = desc.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url) {
								return '<a href="'+url+'">'+url+'</a>';
							}).replace(/\B@([_a-z0-9]+)/ig, function(reply) {
								return  reply.charAt(0)+'<a href="http://twitter.com/'+reply.substring(1)+'">'+reply.substring(1)+'</a>';
							});
							
							// Maybe a little humanization of the line item
							if (o.link.indexOf("twitter.com") > -1) { desc = '@' + desc; desc = desc.replace(/\B@([_a-z0-9]+):/ig, ""); }
							// Figure out the background icon
							var bg = obj.options.bgDefault;
							if (o.link.indexOf("twitter.com") > -1) { bg = obj.options.bgTwitter; }
							if (res.query.results.rss.channel.generator != undefined && res.query.results.rss.channel.generator.indexOf('wordpress') > -1) { bg = obj.options.bgWordPress }
							if (res.query.results.rss.channel.link != undefined && res.query.results.rss.channel.link.indexOf('github') > -1) { bg = obj.options.bgGithub }
							if (o.description != undefined && o.description.indexOf("last.fm") > -1) { bg = obj.options.bgLastFm; }

							var html = '<li style="background-image: url(' + bg + ');">' + desc + '<br />Posted: ' + obj.relative_time(o.pubDate.replace(/\,/g,'')) + ' (<a href="' + o.link + '">#</a>)</li>';
							obj.contentArray[obj.contentCount] = new Array();
							obj.contentArray[obj.contentCount][0] = html;
							obj.contentArray[obj.contentCount][1] = obj.relative_time(o.pubDate.replace(/\,/g,''));
							obj.contentArray[obj.contentCount][2] = obj.get_delta(o.pubDate.replace(/\,/g,''));
							obj.contentCount ++;
						});
					}
					
					// Array simply to compare length against to know to print feed.
					obj.arrayCheck.push(i);
				},
				error: function() {}});
		});
		
		
		
		
		// Basically check and see if all the YQL calls are done.
		var interval = setInterval(function() {
			if (obj.arrayCheck.length === obj.options.feeds.length) {
				obj.print();
				clearInterval(interval);
			}
		}, 200);
    };

	Plugin.prototype.print = function() {
		
		if (obj.contentArray.length < obj.options.limit) {
			alert('Sorry but you have set a limit (' + obj.options.limit + ') but didn\'t return that many items in your RSS feed.');
			return false;
		}
		
		var ths = obj.contentArray.sort(obj.by(2,1));
		
		// console.log(printThis[0]);
		obj.html = '<ul>';
		
		for (i=0; i < obj.options.limit; i++) {
			obj.html += ths[i][0];
		}
		
		obj.html += '</ul>';
		$(obj.element).html(obj.html);
	};
	
	// pubDate delta function
	Plugin.prototype.get_delta = function (time_value) {
		var values = time_value.split(" ");
		time_value = values[2] + " " + values[1] + ", " + values[3] + " " + values[4];
		var parsed_date = Date.parse(time_value);
		var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
		var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
		if (values[5] == "+0000") {
			delta = delta + (relative_to.getTimezoneOffset() * 60);
		} else {
			delta = delta + relative_to.getTimezoneOffset();
		}


		return delta;
	}

	// Function to return the relative time based off of delta.
	Plugin.prototype.relative_time = function (time_value) {

		var delta = obj.get_delta(time_value);

		if (delta < 60) {
			return 'less than a minute ago';
		} else if(delta < 120) {
			return 'about a minute ago';
		} else if(delta < (60*60)) {
			return (parseInt(delta / 60)).toString() + ' minutes ago';
		} else if(delta < (120*60)) {
			return 'about an hour ago';
		} else if(delta < (24*60*60)) {
			return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';
		} else if(delta < (48*60*60)) {
			return '1 day ago';
		} else {
			return (parseInt(delta / 86400)).toString() + ' days ago';
		}
	}
	
	Plugin.prototype.by = function (i,dir) {
		return function(a,b){a = a[i];b = b[i];return a == b ? 0 : (a < b ? -1*dir : dir)}
	}

    $.fn[pluginName] = function ( options ) {
        return this.each(function () {
            if (!$.data(this, 'plugin_' + pluginName)) {
                $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
            }
        });
    }

})(jQuery, window, document);





/*
 * jQuery JSONP Core Plugin 2.1.4 (2010-11-17)
 * 
 * http://code.google.com/p/jquery-jsonp/
 *
 * Copyright (c) 2010 Julian Aubourg
 *
 * This document is licensed as free software under the terms of the
 * MIT License: http://www.opensource.org/licenses/mit-license.php
 */
;(function($,setTimeout){function noop(){}function genericCallback(data){lastValue=[data]}function appendScript(node){head.insertBefore(node,head.firstChild)}function callIfDefined(method,object,parameters){return method&&method.apply(object.context||object,parameters)}function qMarkOrAmp(url){return/\?/.test(url)?"&":"?"}var STR_ASYNC="async",STR_CHARSET="charset",STR_EMPTY="",STR_ERROR="error",STR_JQUERY_JSONP="_jqjsp",STR_ON="on",STR_ONCLICK=STR_ON+"click",STR_ONERROR=STR_ON+STR_ERROR,STR_ONLOAD=STR_ON+"load",STR_ONREADYSTATECHANGE=STR_ON+"readystatechange",STR_REMOVE_CHILD="removeChild",STR_SCRIPT_TAG="<script/>",STR_SUCCESS="success",STR_TIMEOUT="timeout",browser=$.browser,head=$("head")[0]||document.documentElement,pageCache={},count=0,lastValue,xOptionsDefaults={callback:STR_JQUERY_JSONP,url:location.href};function jsonp(xOptions){xOptions=$.extend({},xOptionsDefaults,xOptions);var completeCallback=xOptions.complete,dataFilter=xOptions.dataFilter,callbackParameter=xOptions.callbackParameter,successCallbackName=xOptions.callback,cacheFlag=xOptions.cache,pageCacheFlag=xOptions.pageCache,charset=xOptions.charset,url=xOptions.url,data=xOptions.data,timeout=xOptions.timeout,pageCached,done=0,cleanUp=noop;xOptions.abort=function(){!done++&&cleanUp()};if(callIfDefined(xOptions.beforeSend,xOptions,[xOptions])===false||done){return xOptions}url=url||STR_EMPTY;data=data?((typeof data)=="string"?data:$.param(data,xOptions.traditional)):STR_EMPTY;url+=data?(qMarkOrAmp(url)+data):STR_EMPTY;callbackParameter&&(url+=qMarkOrAmp(url)+encodeURIComponent(callbackParameter)+"=?");!cacheFlag&&!pageCacheFlag&&(url+=qMarkOrAmp(url)+"_"+(new Date()).getTime()+"=");url=url.replace(/=\?(&|$)/,"="+successCallbackName+"$1");function notifySuccess(json){!done++&&setTimeout(function(){cleanUp();pageCacheFlag&&(pageCache[url]={s:[json]});dataFilter&&(json=dataFilter.apply(xOptions,[json]));callIfDefined(xOptions.success,xOptions,[json,STR_SUCCESS]);callIfDefined(completeCallback,xOptions,[xOptions,STR_SUCCESS])},0)}function notifyError(type){!done++&&setTimeout(function(){cleanUp();pageCacheFlag&&type!=STR_TIMEOUT&&(pageCache[url]=type);callIfDefined(xOptions.error,xOptions,[xOptions,type]);callIfDefined(completeCallback,xOptions,[xOptions,type])},0)}pageCacheFlag&&(pageCached=pageCache[url])?(pageCached.s?notifySuccess(pageCached.s[0]):notifyError(pageCached)):setTimeout(function(script,scriptAfter,timeoutTimer){if(!done){timeoutTimer=timeout>0&&setTimeout(function(){notifyError(STR_TIMEOUT)},timeout);cleanUp=function(){timeoutTimer&&clearTimeout(timeoutTimer);script[STR_ONREADYSTATECHANGE]=script[STR_ONCLICK]=script[STR_ONLOAD]=script[STR_ONERROR]=null;head[STR_REMOVE_CHILD](script);scriptAfter&&head[STR_REMOVE_CHILD](scriptAfter)};window[successCallbackName]=genericCallback;script=$(STR_SCRIPT_TAG)[0];script.id=STR_JQUERY_JSONP+count++;if(charset){script[STR_CHARSET]=charset}function callback(result){(script[STR_ONCLICK]||noop)();result=lastValue;lastValue=undefined;result?notifySuccess(result[0]):notifyError(STR_ERROR)}if(browser.msie){script.event=STR_ONCLICK;script.htmlFor=script.id;script[STR_ONREADYSTATECHANGE]=function(){/loaded|complete/.test(script.readyState)&&callback()}}else{script[STR_ONERROR]=script[STR_ONLOAD]=callback;browser.opera?((scriptAfter=$(STR_SCRIPT_TAG)[0]).text="jQuery('#"+script.id+"')[0]."+STR_ONERROR+"()"):script[STR_ASYNC]=STR_ASYNC}script.src=url;appendScript(script);scriptAfter&&appendScript(scriptAfter)}},0);return xOptions}jsonp.setup=function(xOptions){$.extend(xOptionsDefaults,xOptions)};$.jsonp=jsonp})(jQuery,setTimeout);	