/*slider javascript*/

		var menuSlider=function(){
	var m,e,g,s,q,i; e=[]; q=8; i=8;
	return{
		init:function(j,k){
			m=document.getElementById(j); e=m.getElementsByTagName('li');
			var i,l,w,p; i=0; l=e.length;
			for(i;i<l;i++){
				var c,v; c=e[i]; v=c.value; if(v==1){s=c; w=c.offsetWidth; p=c.offsetLeft}
				c.onmouseover=function(){menuSlider.mo(this)}; c.onmouseout=function(){menuSlider.mo(s)};
			}
			g=document.getElementById(k); g.style.width=w+'px'; g.style.left=p+'px';
		},
		mo:function(d){
			clearInterval(m.tm);
			var el,ew; el=parseInt(d.offsetLeft); ew=parseInt(d.offsetWidth);
			m.tm=setInterval(function(){menuSlider.mv(el,ew)},i);
		},
		mv:function(el,ew){
			var l,w; l=parseInt(g.offsetLeft); w=parseInt(g.offsetWidth);
			if(l!=el||w!=ew){
				if(l!=el){var ld,lr,li; ld=(l>el)?-1:1; lr=Math.abs(el-l); li=(lr<q)?ld*lr:ld*q; g.style.left=(l+li)+'px'}
				if(w!=ew){var wd,wr,wi; wd=(w>ew)?-1:1; wr=Math.abs(ew-w); wi=(wr<q)?wd*wr:wd*q; g.style.width=(w+wi)+'px'}
			}else{clearInterval(m.tm)}
}};}();



/*
	ColorBox v1.1.5 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
	(c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com
	Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
(function(g){var u,k,e,o,c,i,y,l,w,s,p,m,j,h,r,f,q,a,v,n;function b(){g([m]).css({position:"absolute",width:g(window).width(),height:g(window).height(),top:g(window).scrollTop(),left:g(window).scrollLeft()})}function d(z){if(z.keyCode==37){g(document).unbind("keydown.colorKeys");g("a#contentPrevious").click()}else{if(z.keyCode==39){g(document).unbind("keydown.colorKeys");g("a#contentNext").click()}}}function x(){if(g("#colorboxInlineTemp").length>0){g(r).children().insertAfter("#colorboxInlineTemp")}if(w){g(w).remove()}}l=function(){x();g(m).css({cursor:"auto"}).fadeOut("fast");g(s).stop(true,false).removeData("open").fadeOut("fast",function(){g(r).remove()});g(document).unbind("keydown.colorKeys");g(window).unbind("resize scroll",b)};function t(z,A){return(typeof z=="string")?(z.match(/%/)?(A/100)*parseInt(z,10):parseInt(z,10)):z}g(function(){g("body").append(g([m=g('<div id="modalBackgroundOverlay" />')[0],s=g('<div id="colorbox" />')[0]]).hide());g(s).append(g([p=g('<div id="modalWrap" />')[0]])).css("opacity",0).show();g(p).append(g([g('<div><div id="borderTopLeft"></div><div id="borderTopCenter"></div><div id="borderTopRight"></div></div>')[0],a=g('<div id="borderMiddleLeft" />')[0],h=g('<div id="modalContent" />')[0],v=g('<div id="borderMiddleRight" />')[0],g('<div><div id="borderBottomLeft"></div><div id="borderBottomCenter"></div><div id="borderBottomRight"></div></div>')[0]]));g(h).append(g([r=g('<div id="modalLoadedContent"><a id="contentPrevious" href="#"></a><a id="contentNext" href="#"></a><span id="contentCurrent"></span><br id="modalInfoBr"/><span id="contentTitle"></span><div id="preloadPrevious"></div><div id="preloadNext"></div><div id="preloadClose"></div></div>')[0],j=g('<div id="modalLoadingOverlay" />')[0],f=g('<a id="modalClose" href="#"></a>')[0]]));g(document).bind("keydown.colorClose",function(z){if(z.keyCode==27){l()}});g(f).click(function(){l();return false});q=g("#borderTopCenter")[0];n=g("#borderBottomCenter")[0];o=g(q).height()+g(n).height()+g(h).outerHeight(true)-g(h).height();c=g(a).width()+g(v).width()+g(h).outerWidth(true)-g(h).width();e=g(r).outerHeight(true);k=g(r).outerWidth(true);g(r).empty();g(s).css({"padding-bottom":o,"padding-right":c}).hide();g("#contentPrevious, #contentNext, #modalClose").live("mouseover",function(){g(this).addClass("hover")});g("#contentPrevious, #contentNext, #modalClose").live("mouseout",function(){g(this).removeClass("hover")})});g.fn.colorbox=function(E,G){function z(K,O,M,J){var I=document.documentElement.clientHeight;var L=I/2-O/2+g(window).scrollTop();var H=document.documentElement.clientWidth/2-K/2+g(window).scrollLeft();if(O>I){L-=(O-I)}if(L<0){L=0}if(H<0){H=0}K=K-c;O=O-o;function N(P){h.style.width=q.style.width=n.style.width=P.style.width;h.style.height=a.style.height=v.style.height=P.style.height}g(s).animate({height:O,width:K,top:L,left:H},{duration:M,complete:function(){if(J){J()}N(this);if(g.browser.msie&&g.browser.version<7){b()}},step:function(){N(this)}})}var D=[];function A(){if(E.preloading!==false&&y.length>1&&y[i].href.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(.*))?$/i)){var I,H;I=i>0?y[i-1].href:y[y.length-1].href;H=i<y.length-1?y[i+1].href:y[0].href;return[g("<img />").attr("src",H),g("<img />").attr("src",I)]}return false}function B(){g(j).show();if(g(this).attr("id")=="contentPrevious"){i=i>0?i-1:y.length-1}else{i=i<y.length-1?i+1:0}F(y[i].href,y[i].title)}function C(K,J){if(g(s).data("open")!==true){return false}var M=E.transition=="none"?0:E.transitionSpeed;g(r).remove();r=g(K)[0];g(r).hide().appendTo("body").css({width:(E.fixedWidth)?E.fixedWidth-k-c:g(r).width()}).css({height:(E.fixedHeight)?E.fixedHeight-e-o:g(r).height()}).attr({id:"modalLoadedContent"}).append(J).prependTo(g(h));if(g("#modalPhoto").length>0&&E.fixedHeight){var I=(parseInt(g(r)[0].style.height,10)-parseInt(g("#modalPhoto")[0].style.height,10))/2;g("#modalPhoto").css({marginTop:(I>0?I:0)})}function H(N){z(parseInt(r.style.width,10)+k+c,parseInt(r.style.height,10)+e+o,N,function(){if(g(s).data("open")!==true){return false}g(r).show();g(j).hide();g(document).bind("keydown.colorKeys",d);if(G){G()}if(E.transition==="fade"){g(s).animate({opacity:1},M)}return true})}if(E.transition=="fade"){g(s).animate({opacity:0},M,function(){H(0)})}else{H(M)}var L=A();return true}function F(I,J){x();var H="<p id='contentTitle'>"+J+"</p>";if(y.length>1){H+="<span id='contentCurrent'> "+E.contentCurrent+"</span>";H=H.replace(/\{current\}/,i+1).replace(/\{total\}/,y.length);H+="<a id='contentPrevious' href='#'>"+E.contentPrevious+"</a><a id='contentNext' href='#'>"+E.contentNext+"</a> "}if(E.inline){w=g('<div id="colorboxInlineTemp" />').hide().insertBefore(g(I)[0]);u=g(I).clone(true);C(g(I).wrapAll("<div />").parent(),H)}else{if(E.iframe){C(g("<div><iframe name='iframe_"+new Date().getTime()+" 'frameborder=0 src ="+I+"></iframe></div>"),H)}else{if(I.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(.*))?$/i)){w=new Image();w.onload=function(){w.onload=null;C(g("<div />").css({width:this.width,height:this.height}).append(g(this).css({width:this.width,height:this.height,display:"block",margin:"auto"}).attr("id","modalPhoto")),H);if(y.length>1){g(this).css({cursor:"pointer"}).click(B)}};w.src=I}else{w=g("<div />").load(I,function(K,L){if(L=="success"){C(g(this),H)}else{C(g("<p>Request unsuccessful.</p>"))}})}}}}E=g.extend({},g.fn.colorbox.settings,E);g(this).unbind("click.colorbox").bind("click.colorbox",function(){if(E.fixedWidth){E.fixedWidth=t(E.fixedWidth,document.documentElement.clientWidth)}if(E.fixedHeight){E.fixedHeight=t(E.fixedHeight,document.documentElement.clientHeight)}if(this.rel&&"nofollow"!=this.rel){y=g("a[rel='"+this.rel+"']");i=g(y).index(this)}else{y=g(this);i=0}if(g(s).data("open")!==true){g(document).bind("keydown.colorKeys",d);g(f).html(E.modalClose);g(m).css({opacity:E.bgOpacity});g(s).data("open",true).css({opacity:1});g([s,j,m]).show();z(t(E.initialWidth,document.documentElement.clientWidth),t(E.initialHeight,document.documentElement.clientHeight),0);if(g.browser.msie&&g.browser.version<7){g(window).bind("resize scroll",b)}}F(E.href?E.href:y[i].href,E.title?E.title:y[i].title);g("a#contentPrevious, a#contentNext").die().live("click",B);if(E.overlayClose!==false){g(m).css({cursor:"pointer"}).click(function(){l()})}return false});if(E.open!==false&&g(s).data("open")!==true){g(this).triggerHandler("click.colorbox")}return this.each(function(){})};g.fn.colorbox.settings={transition:"elastic",transitionSpeed:350,initialWidth:"400",initialHeight:"400",fixedWidth:false,fixedHeight:false,inline:false,iframe:false,href:false,title:false,bgOpacity:0.85,preloading:true,contentCurrent:"image {current} of {total}",contentPrevious:"previous",contentNext:"next",modalClose:"close",open:false,overlayClose:true}})(jQuery);



/***********************************************************************
 * jQuery.flickrGallery v. 0.1
 * 
 * Copyright (c) 2007 Paul Tavares (http://www.purtuga.com)
 * 
 * Dual licensed under the MIT (MIT-LICENSE.txt)and
 * GPL (GPL-LICENSE.txt) licenses.
 * 
 **********************************************************************/
jQuery.fn.flickrGallery=function(uOpt){var opt={api_key:null,user_id:null,photoset_ids:[],loading_msg:'Loading ...',thumb_click_hide:false};if(uOpt)$.extend(opt,uOpt);return this.each(function(){var self=jQuery.flickrGallery;var uId=self.getNextUid();var hId=this.id||'flickrGallery-'+uId;if($('#'+hId+' .flickrGalleryCntr').length)return;self.opt[uId]=jQuery.flickrGallery.gallery(opt);self.opt[uId].htmlId=hId;self.opt[uId].uId=uId;self.opt[uId].galId=uId;$(this).append('<div class="flickrGalleryCntr">'+'<div class="flickrGalleryAllAlbums"></div>'+'<div style="clear: both;"></div>'+'<div class="flickrGalleryImages" style="display: none;">'+'<div class="flickrGalleryImageMenu" style="position: absolute; z-index: 10;">'+'<div class="flickrGalleryImageMenuButtons">'+'<table width="100%"><tr>'+'<td width="" align="left" nowrap>'+'<a href="" class="flickrGalleryImageMenuButtonsGallery">Back</a>'+'<a href="" class="flickrGalleryImageMenuButtonsThumbs">Images</a>'+'</td>'+'<td width="" align="center" nowrap>'+'<div class="flickrGalleryImageMenuImgCount"></div>'+'</td>'+'<td width="" align="center" nowrap>'+'<a href="" class="flickrGalleryImageMenuButtonsPrev">Prev</a> '+' <a href="" class="flickrGalleryImageMenuButtonsNext">Next</a>'+'</td>'+'</tr></table>'+'</div>'+'<div class="flickrGalleryImageThumbs" style="display: none;">Other images</div>'+'</div>'+'<div class="flickrGalleryImageView"><div class="flickrGalleryLoading">Loading. . .</div></div>'+'</div>'+'</div>');$('.flickrGalleryImageMenu',this).unbind().hover(function(){$(this).addClass('flickrGalleryImageMenuHover')},function(){$(this).removeClass('flickrGalleryImageMenuHover');jQuery.flickrGallery.opt[uId].hideThumbs()});self.init(uId);return this})};jQuery.flickrGallery={};jQuery.flickrGallery.next_uid=1;jQuery.flickrGallery.opt={};jQuery.flickrGallery.gallery=function(o){o.albums={};o.uId=null;o.galId=null;o.htmlId=null;o.galleryLoaded=false;o.imgThumbsOn=false;o.next_uid=0;o.clearImgArea=jQuery.flickrGallery.clearImgArea;o.isAlbumPicInfoLoaded=jQuery.flickrGallery.isAlbumPicInfoLoaded;o.showGallery=jQuery.flickrGallery.showGallery;o.showAlbum=jQuery.flickrGallery.showAlbum;o.buildAlbum=jQuery.flickrGallery.buildAlbum;o.showThumbs=jQuery.flickrGallery.showThumbs;o.hideThumbs=jQuery.flickrGallery.hideThumbs;o.getNextUid=jQuery.flickrGallery.getNextUid;o.insertLoadingMsg=function(){jQuery.flickrGallery.insertLoadingMsg(this.uId,'g')};o.clearLoadingMsg=function(){jQuery.flickrGallery.clearLoadingMsg(this.uId,'g')};return o};jQuery.flickrGallery.showGallery=function(){var gal=this;$('#'+gal.htmlId+' .flickrGalleryImages').fadeOut('fast');$('#'+gal.htmlId+' .flickrGalleryAllAlbums').fadeIn('normal');return void(0)};jQuery.flickrGallery.getNextUid=function(pre){if(!pre){pre='g'};var retVal=pre+this.next_uid;this.next_uid+=1;return retVal};jQuery.flickrGallery.init=function(uId){if(!uId)return;var self=jQuery.flickrGallery;var opt=self.opt[uId];if(opt.galleryLoaded)return;var url='http://api.flickr.com/services/rest/?format=json&jsoncallback='+'jQuery.flickrGallery.opt.'+uId+'.buildAlbum&api_key='+opt.api_key+'&method=flickr.photosets.getInfo';if(opt.photoset_ids.length){for(var i=0;i<opt.photoset_ids.length;i++){var tUrl=url+'&photoset_id='+opt.photoset_ids[i];var script=document.createElement('script');script.type='text/javascript';script.id=uId+opt.htmlId+opt.photoset_ids[i]+'_albumInfo';script.src=tUrl;$('head').append(script)}}opt.galleryLoaded=true;return};jQuery.flickrGallery.buildAlbum=function(json){var gal=this;if(json.stat!="ok"){$('#'+gal.htmlId+' .flickrGalleryAllAlbums').append(jQuery.flickrGallery.getFlickrApiError(json));return}else{var albumId=gal.getNextUid('a');gal.albums[albumId]=json.photoset;var p=gal.albums[albumId];if(!p.photos){$('#'+gal.htmlId+' .flickrGalleryAllAlbums').append('<div class="flickrGalleryAlbum">'+'<h3>'+p.title._content+'</h3>'+'<div>No pictures in this album.</div>'+'<span>'+p.description._content+'</span></div>');}else{p.getImgUrl=function(s){if(!s){s='s'};return jQuery.flickrGallery.getImgUrl(this.farm,this.server,this.primary,this.secret,s)};p.buildImgList=jQuery.flickrGallery.buildImgList;p.showImg=jQuery.flickrGallery.showImg;p.displayPics=jQuery.flickrGallery.displayPics;p.uId=albumId;p.galId=gal.uId;p.htmlId=gal.htmlId;p.imgListLoaded=false;$('#'+gal.htmlId+' .flickrGalleryAllAlbums').append('<div class="flickrGalleryAlbum">'+'<h3>'+p.title._content+'</h3><a href="javascript: '+'jQuery.flickrGallery.opt.'+gal.uId+'.showAlbum(\''+albumId+'\');'+'"><img align="top" src="'+p.getImgUrl('s')+'" alt="" /></a>'+'<span>'+p.description._content+'</span></div>')}};$('#'+gal.uId+gal.htmlId+p.id+'_albumInfo').remove();return true};jQuery.flickrGallery.getFlickrApiError=function(json){var err='<div class="flickrGalleryAlbum"><p>Unable to retrieve album.</p>'+'<p>ERROR: '+json.code+': '+json.message+' </p><br></div>';return err};jQuery.flickrGallery.insertLoadingMsg=function(g,w){var gal=jQuery.flickrGallery.opt[g];var h='<div class="flickrGalleryLoading">Loading...</div>';w=w.toLowerCase();if(w=='i'){}else if(w=='t'){}else if(w=='g'){$('#'+gal.htmlId+' .flickrGalleryAllAlbums').prepend(h)};return};jQuery.flickrGallery.clearLoadingMsg=function(g,w){var gal=jQuery.flickrGallery.opt[g];w=w.toLowerCase();if(w=='i'){}else if(w=='t'){}else if(w=='g'){$('#'+gal.htmlId+' .flickrGalleryAllAlbums .flickrGalleryLoading').remove()};return};jQuery.flickrGallery.getImgUrl=function(f,m,i,h,s){if(s){s='_'+s}else{s=''};var url='http://farm'+f+'.static.flickr.com/'+m+'/'+i+'_'+h+s+'.jpg';return url};jQuery.flickrGallery.showAlbum=function(id){var gal=this;$('#'+gal.htmlId+' .flickrGalleryAllAlbums').hide(0);gal.clearImgArea();$('#'+gal.htmlId+' .flickrGalleryImages').fadeIn();if(gal.albums[id]&&gal.albums[id].imgListLoaded){gal.albums[id].displayPics();return};var sURL='http://api.flickr.com/services/rest/?format=json&jsoncallback='+'jQuery.flickrGallery.opt.'+gal.uId+'.albums.'+id+'.buildImgList'+'&api_key='+gal.api_key+'&method=flickr.photosets.getPhotos'+'&photoset_id='+gal.albums[id].id+'&thisUID='+new Date().valueOf();var imgViewCntr=$('#'+gal.htmlId+' .flickrGalleryImageView');var scriptId=gal.uId+gal.htmlId+id+'_photosetImgInfo';var script=document.createElement('SCRIPT');script.type='text/javascript';script.id=scriptId;script.src=sURL;$('head').append(script);return void(0)};jQuery.flickrGallery.clearImgArea=function(){var gal=this;var h=$('#'+gal.htmlId);$('.flickrGalleryImageView',h).empty().append('<div class="flickrGalleryLoading">'+gal.loading_msg+'</div>');$('.flickrGalleryImageThumbs',h).hide(0).empty();$('.flickrGalleryImageMenuButtonsPrev',h).attr('href','javascript: void();');$('.flickrGalleryImageMenuButtonsNext',h).attr('href','javascript: void();');$('.flickrGalleryImageMenuButtonsThumbs',h).attr('href','javascript: void();')};jQuery.flickrGallery.displayPics=function(){var alb=this;var img=alb.images;$('#'+alb.htmlId+' .flickrGalleryImageMenuButtonsPrev').attr('href','javascript: jQuery.flickrGallery.opt.'+alb.galId+'.albums.'+alb.uId+'.images.nextImg("p");');$('#'+alb.htmlId+' .flickrGalleryImageMenuButtonsNext').attr('href','javascript: jQuery.flickrGallery.opt.'+alb.galId+'.albums.'+alb.uId+'.images.nextImg("n");');$('#'+alb.htmlId+' .flickrGalleryImageMenuButtonsGallery').attr('href','javascript: jQuery.flickrGallery.opt.'+img.galId+'.showGallery();');$('#'+alb.htmlId+' .flickrGalleryImageMenuButtonsThumbs').attr('href','javascript: jQuery.flickrGallery.opt.'+alb.galId+'.showThumbs();');img.nextImg();img.buildThumbs();return};jQuery.flickrGallery.buildThumbs=function(){var img=this;var t=$('#'+img.htmlId+' .flickrGalleryImageThumbs');var clickHide='';var thumbs='<ul>';t.empty();if(jQuery.flickrGallery.opt[img.galId].thumb_click_hide){clickHide='jQuery.flickrGallery.opt.'+img.galId+'.hideThumbs();'}for(var i=0;i<img.photo.length;i++){thumbs+='<li>'+'<a href="javascript: jQuery.flickrGallery.opt.'+img.galId+'.albums.'+img.albumId+'.images.nextImg('+i+');'+clickHide+'">'+'<img alt="'+img.photo[i].title+'" src="'+img.getImgUrl('s',i)+'">'+'</a></li>'};thumbs+='</ul><div style="clear: both;"></div>';t.append(thumbs);return};jQuery.flickrGallery.isAlbumPicInfoLoaded=function(f,retRef){var gal=this;if(!f||!gal.albums)return false;for(var y in gal.albums){if(gal.albums[y].id==f){if(retRef){return gal.albums[y]}else{return true}}};return false};jQuery.flickrGallery.buildImgList=function(json){var alb=this;if(json.stat!="ok"){$('#'+alb.htmlId+' .flickrGalleryAllAlbums').append(jQuery.flickrGallery.getFlickrApiError(json))}else{alb.images=json.photoset;var img=alb.images;img.getImgUrl=function(s,i){if(!s){s=''};var albImg=this;return jQuery.flickrGallery.getImgUrl(albImg.photo[i].farm,albImg.photo[i].server,albImg.photo[i].id,albImg.photo[i].secret,s)};img.nextImg=jQuery.flickrGallery.showImg;img.buildThumbs=jQuery.flickrGallery.buildThumbs;img.albumId=alb.uId;img.galId=alb.galId;img.htmlId=alb.htmlId;img.imgCurrent=0;alb.imgListLoaded=true;alb.displayPics()}$('#'+alb.galId+alb.htmlId+alb.uId+'_photosetImgInfo').remove();return true};jQuery.flickrGallery.showImg=function(n){var albImg=this;var gal=jQuery.flickrGallery.opt[albImg.galId];var t=albImg.photo.length;var hideThumbs=false;if(!n&&n!=0){n=0}else if(n=='p'){n=albImg.imgCurrent-1;if(n<0)n=0;hideThumbs=true}else if(n=='n'){n=albImg.imgCurrent+1;if(n>t-1)n=t-1;hideThumbs=true};var newImg=new Image();var imgUrl=albImg.getImgUrl('',n);var imgCntr=$('#'+albImg.htmlId+' .flickrGalleryImageView');if(hideThumbs){jQuery.flickrGallery.opt[albImg.galId].hideThumbs()};$('img',imgCntr).fadeOut('slow');imgCntr.empty().append('<div class="flickrGalleryLoading">'+gal.loading_msg+'</div>');$(newImg).hide(0).load(function(){$('#'+albImg.htmlId+' .flickrGalleryImageView .flickrGalleryLoading').fadeOut('slow').remove();$(this).fadeIn('normal');return true});newImg.alt="";newImg.src=imgUrl;imgCntr.append(newImg);albImg.imgCurrent=n;$('#'+albImg.htmlId+' .flickrGalleryImageMenuImgCount').empty().append((n+1)+' of '+t);return void(0)};jQuery.flickrGallery.showThumbs=function(){var gal=this;if(gal.imgThumbsOn){gal.hideThumbs();return};$('#'+gal.htmlId+' .flickrGalleryImageThumbs').slideDown('slow');gal.imgThumbsOn=true};jQuery.flickrGallery.hideThumbs=function(){var gal=this;if(!gal.imgThumbsOn)return;$('#'+gal.htmlId+' .flickrGalleryImageThumbs').slideUp('slow');gal.imgThumbsOn=false};