var SAME_POPUP=true;var PROFILE_WINDOW_HEIGHT=500;var PROFILE_WINDOW_WIDTH=520;var LOGIN_WINDOW_HEIGHT=140;var LOGIN_WINDOW_WIDTH=400;var GALLERY_HEIGHT=600;var GALLERY_WIDTH=625;var currentWidget=null;var widgetTimeout=null;(function($){$(document).ready(function(){new Menu('#udm');$('.openButton').each(function(){var li=this;var $this=$(this);var $list=$this.find('~ ul');if($list.length){var timeout;var over=function(event){li.toggleList(true,event);};var out=function(event){li.toggleList(false,event);};var bodyh=$(document.body).height();this.toggleList=function(show,event){if(show){if(timeout){clearTimeout(timeout);}
$list.css('display','block');}else{timeout=setTimeout(function(){$list.css('display','none')},200);}}
$list.hover(over,out);$this.hover(over,out);}});if(typeof hs!='undefined'){$('a[href*=our_work/slideshow]').click(function(){var params={objectType:'iframe',contentId:'hs-box',width:760,height:600};if(this.href.match(/category/)){params.wrapperClassName='hs-portfolio';}
return hs.htmlExpand(this,params);});}
$('#site-search-button').click(function(){var search_for=$('#site-search-for').val();if(search_for!='')
$('#search-form').submit();else
$('#site-search-for').focus();});});function Menu(list){var _this=this;$(list).children('li').each(function(i,a){var $this=$(this);var $children=$this.find('> ul');if($children.length>0){$this.addClass('with-child');}
$children.each(function(){new Menu(this);});this._menu=_this;$this.hover(_this.onItemOver,_this.onItemOut);var bg=$this.css('background-image');var item=this;this.showBackground=_this.getToggleFn(this);});}
Menu.prototype={current:null,getToggleFn:function(menuitem){var $img=$(menuitem).find('> a img');if($img.length){var off=$img.attr('src');var on=$img.attr('src').replace('_off.','_on.');return function(hover){$img.attr('src',hover?on:off);}}else{return function(hover){return off;}}},hide:function(menuitem){if(typeof menuitem._timeout!='undefined'){clearTimeout(menuitem._timeout);}
$(menuitem).children('ul').children('li').each(function(){if(this._menu.current==this){this._menu.hide(this);}});$(menuitem).children('ul').each(function(){var $this=$(this);$this.children('li').each(function(){if(this._menu.current==this){this._menu.hide(this);}});$this.css('display','none');});menuitem.showBackground(false);},show:function(menuitem){if(typeof menuitem._timeout!='undefined'){clearTimeout(menuitem._timeout);}
$(menuitem).children('ul').css('display','block');menuitem.showBackground(true);},onItemOver:function(event){this._menu.show(this);if(this._menu.current!=null){if(this._menu.current==this){return;}
this._menu.hide(this._menu.current);}
this._menu.current=this;return true;},onItemOut:function(event){var _this=this;this._timeout=setTimeout(function(){_this._menu.hide(_this);if(_this._menu.current==_this){_this._menu.current=null;}},400);return true;}};})(jQuery);function addLoadListener(fn){if(typeof window.addEventListener!='undefined'){window.addEventListener('load',fn,false);}
else if(typeof document.addEventListener!='undefined'){document.addEvenListener('load',fn,false);}
else if(typeof window.attachEvent!='undefined'){window.attachEvent('onload',fn);}
else{var oldFn=window.onload;if(typeof window.onload!='function'){window.onload=fn;}
else{window.onload=function()
{oldFn();fn;};}}}
function toggleWidgetVisibility(widgetID){if(widgetTimeout!=null)
clearTimeout(widgetTimeout);var elem=document.getElementById(widgetID);if(currentWidget!=null&&widgetID!=currentWidget){hideWidget(currentWidget);}
if(elem){elem.style.display='block';widgetTimeout=setTimeout("hideWidget('"+widgetID+"')",3000);currentWidget=widgetID;}}
function hideWidget(widgetID){var elem=document.getElementById(widgetID);if(elem){elem.style.display='none';}}
function displayPreview(widgetID){var elem=document.getElementById(widgetID);if(elem)
{elem.style.display='block';clearTimeout(widgetTimeout);}}
function hidePreview(widgetID){var elem=document.getElementById(widgetID);if(elem){elem.style.display='none';widgetTimeout=setTimeout("hideWidget('"+currentWidget+"')",100);}}
function ClearForm(form){document.getElementById(form).reset();return false;}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;}
function galleryPopup(URL){if(SAME_POPUP)
window_name='';window.open(URL,window_name,'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+GALLERY_WIDTH+',height='+GALLERY_HEIGHT);}
function galleryClose()
{window.close();}
function parentExists()
{return(parent.location==window.location)?false:true;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)
d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)
d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)
x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)
x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)
x.oSrc=x.src;x.src=a[i+2];}}
function ProjectPopup(URL,window_name){if(SAME_POPUP||!window_name)
window_name='project';window.open(URL,window_name,'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=520,height='+PROFILE_WINDOW_HEIGHT);}
function LoginPopup(URL){window.open(URL,'project','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height='+LOGIN_WINDOW_HEIGHT);}
function Popup(URL){window.open(URL,'project');}
