(function($){$.fn.jMyCarousel=function(o){o=$.extend({btnPrev:null,btnNext:null,mouseWheel:true,auto:true,speed:2000,easing:'linear',vertical:false,circular:true,visible:'4',start:0,scroll:1,step:50,eltByElt:false,evtStart:'mouseover',evtStop:'mouseout',beforeStart:null,afterEnd:null},o||{});return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var div=$(this),ul=$("ul",div),tLi=$("li",ul),tl=tLi.size(),v=o.visible;var mousewheelN=0;var defaultBtn=(o.btnNext===null&&o.btnPrev===null)?true:false;var cssU=(v.toString().indexOf("%")!=-1?'%':(v.toString().indexOf("px")!=-1)?'px':'el');var direction=null;if(o.circular){var imgSet=tLi.clone();ul.prepend(imgSet).append(imgSet.clone());}
var li=$("li",ul);div.css("visibility","visible");li.css("overflow","hidden").css("float",o.vertical?"none":"left").children().css("overflow","hidden");if(!o.vertical){li.css("display","inline");}
if(li.children().get(0).tagName.toLowerCase()=='a'&&!o.vertical){li.children().css('float','left');}
if(o.vertical&&jQuery.browser.msie){li.css('line-height','4px').children().css('margin-bottom','-4px');}
ul.css("margin","0").css("padding","0").css("position","relative").css("list-style-type","none").css("z-index","1");div.css("overflow","hidden").css("position","relative").css("z-index","2").css("left","0px");var liSize=o.vertical?height(li):width(li);var liSizeV=o.vertical?elHeight(li):height(li);var curr=o.start;var nbAllElts=li.size();var ulSize=liSize*nbAllElts;var nbElts=tl;var eltsSize=nbElts*liSize;var allEltsSize=nbAllElts*liSize;var step=o.step=='default'?liSize:o.step;o.btnPrev=defaultBtn?$('<input type="button" class="'+(o.vertical?'up':'prev')+'" />'):$(o.btnPrev);o.btnNext=defaultBtn?$('<input type="button" class="'+(o.vertical?'down':'next')+'" />'):$(o.btnNext);var prev=o.btnPrev;var next=o.btnNext;if(defaultBtn&&o.auto!==true){prev.css({'opacity':'0.6'});next.css({'opacity':'0.6'});div.prepend(prev);div.prepend(next);o.btnPrev=prev;o.btnNext=next;}
if(o.eltByElt){step=liSize;if(o.start%liSize!==0){var imgStart=parseInt(o.start/liSize);curr=o.start=(imgStart*liSize);}}
if(o.circular){o.start+=(liSize*tl);curr+=(liSize*tl);}
var divSize,cssSize,cssUnity;if(cssU=='%'){divSize=0;cssSize=parseInt(v);cssUnity="%";}
else if(cssU=='px'){divSize=parseInt(v);cssSize=parseInt(v);cssUnity="px";}
else{divSize=liSize*parseInt(v);cssSize=liSize*parseInt(v);cssUnity="px";}
ul.css(sizeCss,ulSize+"px").css(animCss,-(o.start));div.css(sizeCss,cssSize+cssUnity);if(o.vertical&&cssUnity=='%'){var pxsize=((liSize*nbElts)*(parseInt(v)/100));div.css(sizeCss,pxsize+'px');}
if(divSize===0){divSize=div.width();}
if(o.vertical){div.css("width",liSizeV+'px');ul.css("width",liSizeV+'px');li.css('margin-bottom',(parseInt(li.css('margin-bottom'))*2)+'px');li.eq(li.size()-1).css('margin-bottom',li.css('margin-top'));}else{div.css('height',liSizeV+'px');ul.css('height',liSizeV+'px');}
if(cssU=='%'){v=divSize/li.width();if(v%1!==0){v+=1;}
v=parseInt(v);}
var divVSize=div.height();if(defaultBtn){next.css({'z-index':200,'position':'absolute'});prev.css({'z-index':200,'position':'absolute'});if(o.vertical){prev.css({'width':prev.width(),'height':prev.height(),'top':'0px','left':parseInt(liSizeV/2)-parseInt(prev.width()/2)+'px'});next.css({'width':prev.width(),'height':prev.height(),'top':(divVSize-prev.height())+'px','left':parseInt(liSizeV/2)-parseInt(prev.width()/2)+'px'});}
else{prev.css({'left':'0px','top':parseInt(liSizeV/2)-parseInt(prev.height()/2)+'px'});next.css({'right':'0px','top':parseInt(liSizeV/2)-parseInt(prev.height()/2)+'px'});}}
if(o.btnPrev){$(o.btnPrev).bind(o.evtStart,function(){if(defaultBtn){o.btnPrev.css('opacity',0.9);}
running=true;direction='backward';return backward();});$(o.btnPrev).bind(o.evtStop,function(){if(defaultBtn){o.btnPrev.css('opacity',0.6);}
running=false;direction=null;return stop();});}
if(o.btnNext){$(o.btnNext).bind(o.evtStart,function(){if(defaultBtn){o.btnNext.css('opacity',0.9);}
running=true;direction='forward';return forward();});$(o.btnNext).bind(o.evtStop,function(){if(defaultBtn){o.btnNext.css('opacity',0.6);}
running=false;direction=null;return stop();});}
if(o.auto===true){running=true;forward();}
if(o.mouseWheel&&div.mousewheel){div.mousewheel(function(e,d){if(!o.circular&&(d>0?(curr+divSize<ulSize):(curr>0))||o.circular){mousewheelN+=1;if(running===false){if(d>0){forward(step,true);}
else{backward(step,true);}
running=true;}}});}
function forward(stepsize,once){var s=(stepsize?stepsize:step);if(running===true&&direction==="backward"){return;}
if(!o.circular){if(curr+s+(o.vertical?divVSize:divSize)>eltsSize){s=eltsSize-(curr+(o.vertical?divVSize:divSize));}}
ul.animate(animCss=="left"?{left:-(curr+s)}:{top:-(curr+s)},o.speed,o.easing,function(){curr+=s;if(o.circular){if(curr+(o.vertical?divVSize:divSize)+liSize>=allEltsSize){ul.css(o.vertical?'top':'left',-curr+eltsSize);curr-=eltsSize;}}
if(!once&&running){forward();}
else if(once){if(--mousewheelN>0){this.forward(step,true);}
else{running=false;direction=null;}}});}
function backward(stepsize,once){var s=(stepsize?stepsize:step);if(running===true&&direction==="forward"){return;}
if(!o.circular){if(curr-s<0){s=curr-0;}}
ul.animate(animCss=="left"?{left:-(curr-s)}:{top:-(curr-s)},o.speed,o.easing,function(){curr-=s;if(o.circular){if(curr<=liSize){ul.css(o.vertical?'top':'left',-(curr+eltsSize));curr+=eltsSize;}}
if(!once&&running){backward();}
else if(once){if(--mousewheelN>0){backward(step,true);}
else{running=false;direction=null;}}});}
function stop(){if(!o.eltByElt){ul.stop();curr=0-parseInt(ul.css(animCss));}
running=false;direction=null;}
function imgSize(el,dimension){if(dimension=='width'){return el.find('img').width();}
else{return el.find('img').height();}}
function elHeight(el){var elImg=el.find('img');if(o.vertical){return parseInt(el.css('margin-left'))+parseInt(el.css('margin-right'))+parseInt(elImg.width())+parseInt(el.css('border-left-width'))+parseInt(el.css('border-right-width'))+parseInt(el.css('padding-right'))+parseInt(el.css('padding-left'));}
else{return parseInt(el.css('margin-top'))+parseInt(el.css('margin-bottom'))+parseInt(elImg.width())+parseInt(el.css('border-top-height'))+parseInt(el.css('border-bottom-height'))+parseInt(el.css('padding-top'))+parseInt(el.css('padding-bottom'));}}
function debug(html){$('#debug').html($('#debug').html()+html+"<br/>");}});};function css(el,prop){return parseInt($.css(el[0],prop))||0;}
function width(el){return el[0].offsetWidth+css(el,'marginLeft')+css(el,'marginRight');}
function height(el){return el[0].offsetHeight+css(el,'marginTop')+css(el,'marginBottom');}})(jQuery);(function($){$.fn.dumbCrossFade=function(settings){var publicAccessorLabel='dumbCrossFade.publicAccessor';var configLabel='dumbCrossFade.config';if(typeof(this.data(publicAccessorLabel))!=='undefined'&&this.data(publicAccessorLabel)!==null){var pa=this.data(publicAccessorLabel);var cg=this.data(configLabel);var args=Array.prototype.slice.apply(arguments);if(args.length>0){if(typeof(args[0])==='object'){if(settings)$.extend(cg,settings);var args=Array.prototype.slice.apply(arguments);if(args.length>1){args=args.slice(1,args.length);}else{pa.start();return this;}}
if(arguments.length===1){pa[arguments[0]]();}else if(arguments.length>1){var args=Array.prototype.slice.apply(arguments);args=args.slice(1,args.length);pa[arguments[0]].apply(this,args);}}
return this;}
var config={'slideType':'slidehorizontal','index':0,'showTime':8000,'transitionTime':1000,'doHoverPause':true,'maxZIndex':100,'slideChange':null,'direction':'forward','fadeInOut':false},timeOut=null,itemArray=[],blockAnimation=false,lastIndexRequest=-1,$self=this
$window=$(window),$body=$('body');if(settings)$.extend(config,settings);function cancelSlideShow(){if(timeOut!==null){window.clearTimeout(timeOut);timeOut=null;}}
function doSlideShowNow(){if(blockAnimation){if(arguments.length>0){lastIndexRequest=arguments[0];}
return;}
var currentIndex=config.index;var nextIndex=(arguments.length>0)?arguments[0]:(config.index>=itemArray.length-1)?0:config.index+1;if(config.direction==='backward'){if(currentIndex===0){nextIndex=itemArray.length-1;}else{nextIndex=currentIndex-1;}}
if(currentIndex==nextIndex){return;}
var $f=itemArray[currentIndex].show(),$n=itemArray[nextIndex];blockAnimation=true;doneF=function(){$f.hide();if(config.fadeInOut){$f.css({'opacity':'1.0'});$n.css({'opacity':'1.0'});}
blockAnimation=false;if(lastIndexRequest!=-1){doSlideShowNow(lastIndexRequest);lastIndexRequest=-1;}};$f.css('z-index',(config.maxZIndex-1)+'');$n.css('z-index',config.maxZIndex+'');switch(config.slideType){case'slidehorizontal':var pos=$f.position(),width=$f.width(),adjustX='-='+width;if(config.direction==='forward'){$n.css({'left':(parseInt(pos.left)+width)+'px'});}else{$n.css({'left':(parseInt(pos.left)-width)+'px'});adjustX='+='+width;}
if(config.fadeInOut){$n.css({'opacity':'0','display':'block'});$f.animate({'left':adjustX,'opacity':'0'},config.transitionTime,'swing');$n.animate({'left':adjustX,'opacity':'1.0'},config.transitionTime,'swing',doneF);}else{$n.show();$f.animate({'left':adjustX},config.transitionTime,'swing');$n.animate({'left':adjustX},config.transitionTime,'swing',doneF);}
break;case'slidevertical':var pos=$f.position(),height=$f.height(),adjustY='-='+height;if(config.direction==='forward'){$n.css({'top':(parseInt(pos.top)+height)+'px','display':'block'});}else{$n.css({'top':(parseInt(pos.top)-height)+'px','display':'block'});adjustY='+='+height;}
if(config.fadeInOut){$n.css({'opacity':'0','display':'block'});$f.animate({'top':adjustY,'opacity':'0'},config.transitionTime,'swing');$n.animate({'top':adjustY,'opacity':'1.0'},config.transitionTime,'swing',doneF);}
else{$n.show();$f.animate({'top':adjustY},config.transitionTime);$n.animate({'top':adjustY},config.transitionTime,doneF);}
break;case'fade':$n.fadeIn(config.transitionTime,doneF);break;}
if(config.slideChange!==null){config.slideChange(nextIndex);}
config.index=nextIndex;}
function doSlideShow(){cancelSlideShow();timeOut=window.setTimeout(function(){doSlideShowNow();doSlideShow();},config.showTime);}
$self.each(function(){(itemArray.length===config.index)?$(this).show():$(this).hide();if(itemArray.length===0){if(config.doHoverPause){$(this).parent().hover(function(){cancelSlideShow();},function(){cancelSlideShow();doSlideShow();});}}
itemArray[itemArray.length]=$(this);});var publicAccessor={'jump':function(index){cancelSlideShow();doSlideShowNow(index);return publicAccessor;},'start':function(){$self.children().hide();itemArray[config.index].show();config.direction='forward';doSlideShow();},'stop':function(){cancelSlideShow();},'next':function(){config.direction='forward';cancelSlideShow();doSlideShowNow();},'previous':function(){config.direction='backward';cancelSlideShow();doSlideShowNow();}};this.data(publicAccessorLabel,publicAccessor);this.data(configLabel,config);doSlideShow();return this;};})(jQuery);var QueryLoader={overlay:"",loadBar:"",preloader:"",items:new Array(),doneStatus:0,doneNow:0,selectorPreload:"body",ieLoadFixTime:2000,ieTimeout:"",init:function(){if(navigator.userAgent.match(/MSIE (\d+(?:\.\d+)+(?:b\d*)?)/)=="MSIE 6.0,6.0"){return false;}
if(QueryLoader.selectorPreload=="body"){QueryLoader.spawnLoader();QueryLoader.getImages(QueryLoader.selectorPreload);QueryLoader.createPreloading();}else{$(document).ready(function(){QueryLoader.spawnLoader();QueryLoader.getImages(QueryLoader.selectorPreload);QueryLoader.createPreloading();});}
QueryLoader.ieTimeout=setTimeout("QueryLoader.ieLoadFix()",QueryLoader.ieLoadFixTime);},ieLoadFix:function(){if($.browser.msie){if((100/QueryLoader.doneStatus)*QueryLoader.doneNow<100){QueryLoader.imgCallback();QueryLoader.ieTimeout=setTimeout("QueryLoader.ieLoadFix()",QueryLoader.ieLoadFixTime);}}},imgCallback:function(){QueryLoader.doneNow++;QueryLoader.animateLoader();},getImages:function(selector){var everything=$(selector).find("*:not(script)").each(function(){var url="";if($(this).css("background-image")!="none"){var url=$(this).css("background-image");}else if(typeof($(this).attr("src"))!="undefined"&&$(this).attr("tagName").toLowerCase()=="img"){var url=$(this).attr("src");}
url=url.replace("url(\"","");url=url.replace("url(","");url=url.replace("\")","");url=url.replace(")","");if(url.length>0){QueryLoader.items.push(url);}});},createPreloading:function(){QueryLoader.preloader=$("<div></div>").appendTo(QueryLoader.selectorPreload);$(QueryLoader.preloader).css({height:"0px",width:"0px",overflow:"hidden"});var length=QueryLoader.items.length;QueryLoader.doneStatus=length;for(var i=0;i<length;i++){var imgLoad=$("<img></img>");$(imgLoad).attr("src",QueryLoader.items[i]);$(imgLoad).unbind("load");$(imgLoad).bind("load",function(){QueryLoader.imgCallback();});$(imgLoad).appendTo($(QueryLoader.preloader));}},spawnLoader:function(){if(QueryLoader.selectorPreload=="body"){var height=$(window).height();var width=$(window).width();var position="fixed";}else{var height=$(QueryLoader.selectorPreload).outerHeight();var width=$(QueryLoader.selectorPreload).outerWidth();var position="absolute";}
var left=$(QueryLoader.selectorPreload).offset()['left'];var top=$(QueryLoader.selectorPreload).offset()['top'];QueryLoader.overlay=$("<div></div>").appendTo($(QueryLoader.selectorPreload));$(QueryLoader.overlay).addClass("QOverlay");$(QueryLoader.overlay).css({position:position,top:top,left:left,width:width+"px",height:height+"px"});QueryLoader.loadBar=$("<div></div>").appendTo($(QueryLoader.overlay));$(QueryLoader.loadBar).addClass("QLoader");$(QueryLoader.loadBar).css({position:"relative",top:"50%",width:"0%"});QueryLoader.loadMsg=$("<span>Loading...</span>").appendTo($(QueryLoader.overlay));$(QueryLoader.loadMsg).addClass("QLoaderMsg");$(QueryLoader.loadMsg).css({position:"relative",top:"50%",left:"0%",width:"100%"});},animateLoader:function(){var perc=(100/QueryLoader.doneStatus)*QueryLoader.doneNow;if(perc>99){$(QueryLoader.loadBar).stop().animate({width:perc+"%"},500,"linear",function(){QueryLoader.doneLoad();});}else{$(QueryLoader.loadBar).stop().animate({width:perc+"%"},500,"linear",function(){});}},doneLoad:function(){clearTimeout(QueryLoader.ieTimeout);if(QueryLoader.selectorPreload=="body"){var height=$(window).height();}else{var height=$(QueryLoader.selectorPreload).outerHeight();}
$(QueryLoader.loadMsg).remove();if($.browser.msie){$(QueryLoader.loadBar).remove();$(QueryLoader.overlay).fadeOut(800);$(QueryLoader.preloader).remove();}
else{$(QueryLoader.loadBar).animate({height:height+"px",top:0},500,"linear",function(){$(QueryLoader.overlay).fadeOut(800);$(QueryLoader.preloader).remove();});}
$('.thumbs a:first').addClass('selected');var options={slideChange:function(currentIndex){$('.thumbs a').removeClass('selected');$('.thumbs a:eq('+currentIndex+')').addClass('selected');},slideType:'fade'};$('.slidebox .slide').dumbCrossFade(options);var i=0;$('.thumbs a').each(function(){$(this).attr('href',i+'');i++;});$('.thumbs a').click(function(){$('.slidebox .slide').dumbCrossFade('jump',parseInt($(this).attr('href')));return false;});}}
function date_ddmmmyy(date){var d = date.getDate();var m = date.getMonth() + 1;var y = date.getYear();if(y >= 2000){y -= 2000}if(y >= 100){y -= 100}var mmm =( 1==m)?'January':( 2==m)?'February':(3==m)?'March':( 4==m)?'April':( 5==m)?'May':(6==m)?'June':( 7==m)?'July':( 8==m)?'August':(9==m)?'September':(10==m)?'October':(11==m)?'November':'December';return "" +(d<10?"0"+d:d) + " " +mmm + " " + "20" +(y<10?"0"+y:y)}function date_lastmodified(){var lmd = document.lastModified;var s= "Unknown";var d1;if(0 != (d1=Date.parse(lmd))){s = "" + date_ddmmmyy(new Date(d1))}return s}function scroll_text(){if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><layer id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></layer></ilayer>')}if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>')}}
var swidth=505;var sheight=18;var sspeed=2;var restart=sspeed;var rspeed=sspeed;var spause=2000;var sbcolor="#ffffff";var singletext=new Array();singletext[0]='<div class=tabb><a target="_self" href="visualisation.html">&bull; architectural visualisation &bull;</a></div>';singletext[1]='<div class=tabb><a target="_self" href="illustration.html">&bull; architectural illustration &bull;</a></div>';singletext[2]='<div class=tabb><a target="_self" href="proddesign.html">&bull; product development &bull;</a></div>';singletext[3]='<div class=tabb><a target="_self" href="illustration.html">&bull; technical illustration &bull;</a></div>';singletext[4]='<div class=tabb><a target="_self" href="creative.html">&bull; game asset development &bull;</a></div>';singletext[5]='<div class=tabb><a target="_self" href="illustration.html">&bull; medical illustration &bull;</a></div>';singletext[6]='<div class=tabb><a target="_self" href="creative.html">&bull; corporate identity &bull;</a></div>';singletext[7]='<div class=tabb><a target="_self" href="illustration.html">&bull; educational reference &bull;</a></div>';singletext[8]='<div class=tabb><a target="_self" href="creative.html">&bull; advertising &bull;</a></div>';var ii=0;function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}
function start(){if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}}
function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed+"px";setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}
