document.write('<style type="text/css">\
     .service_thumb img, .post-view img, .post-thumb img, .featured_work img, .portfolio_image img, .gallery_thumb img { display:none; }\
     .highlight-content { visibility: hidden, opacity: 0 }\
     #preload_highlight { display: block }\
    </style>');jQuery.noConflict();jQuery(document).ready(function($){if(typeof(Cufon)!='undefined'){Cufon.set('fontFamily','Days');Cufon.replace('.head-name h2',{textShadow:'1px 1px rgba(0, 0, 0, 0.5)'});}
$("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});$(".widget_contactformwidget form").submit(function(){var hasError=false;$(this).find('.required').each(function(){$(this).removeClass('error');if($.trim($(this).val())==''){$(this).addClass('error');hasError=true;}});if(hasError==true){return false;}});$("#primary li").hover(function(){$(this).children('a').animate({paddingLeft:'6px'});},function(){$(this).children('a').animate({paddingLeft:'0px'});});$(".posts-widget, .archives").hover(function(){$(this).animate({paddingLeft:'6px'});},function(){$(this).animate({paddingLeft:'0px'});});$(".box-close").click(function(){$(this).parents(".box").slideUp("fast");});$(".nitrografix-tabs").tabs({fx:{height:"toggle",duration:"normal"}});$(".nitrografix-accordion").accordion({autoHeight:false});$('.portfolio-slider').nivoSlider({effect:'fade',slices:15,animSpeed:500,pauseTime:3000,startSlide:0,directionNav:false,directionNavHide:true,controlNav:true,keyboardNav:true,manualAdvance:true,captionOpacity:0});$(this).delay(500,function(){var $images=$('.preload_image img, .service_thumb img');var max=$images.length;var $loadDiv=null;if(max>0)
LoadImage(0,max);function LoadImage(index,max){if(index<max){var type=null;var img=new Image();var $object=$images.eq(index);var $curr=$object.parent('div');if($curr.size()==0){type='url';$curr=$object.parent().parent('div');}
$(img).load(function(){$this=$(this);var width=$object.attr('width');var height=$object.attr('height');if(width&&height)$this.attr({width:width,height:height});var alt=$object.attr('alt');if(alt!=undefined)$this.attr('alt',alt);$object.remove();$this.css('display','none');(type=='url')?$curr.children('a').append(this):$curr.append(this);$this.addClass('image-roll').fadeIn(250,function(){$curr.css('background-image','none');if(type=='url'){var $image=$curr.children('a').children('img');if($curr.hasClass('gallery-image')){$curr.prepend($image);$curr.children('a').addClass('gallery-view-image').css('opacity',0).html('<img alt="'+alt+'" style="display: none" />');var link=$curr.parent().parent().children('h4').children('a').attr('href');$curr.append('<a href="'+link+'" class="gallery-read-more" style="opacity: 0"></a>');$curr.children('.gallery-read-more').css('opacity',0);$(this).parent().parent().hover(function(){$this=$(this).children('div.gallery-image');$img=$this.children('img');$a=$this.find('a');$a.stop(true,true);$img.stop(true,true);$img.fadeTo('slow',0.3)
$a.eq(0).animate({opacity:1,left:'32px',filter:''});$a.eq(1).animate({opacity:1,right:'32px',filter:''});},function(){$(this).children('div.gallery-image').children('img').fadeTo('slow',1.0)
var $a=$(this).children('div.gallery-image').find('a');$a.eq(0).animate({opacity:0,left:'16px',filter:'alpha(opacity=0)'});$a.eq(1).animate({opacity:0,right:'16px',filter:'alpha(opacity=0)'});});}
else{if($curr.hasClass('more-view'))$curr.prepend('<span class="fleche-more" style="width:'+$image.css('width')+';height:'+$image.css('height')+'"></span>');else if($curr.hasClass('more-view-mini'))$curr.prepend('<span class="fleche-more-mini" style="width:'+$image.css('width')+';height:'+$image.css('height')+'"></span>');else $curr.prepend('<span class="magnifying-glass" style="width:'+$image.css('width')+';height:'+$image.css('height')+'"></span>');$(this).hover(function(){$(this).stop(true,true);$(this).fadeTo("normal",0.3);},function(){$(this).fadeTo("normal",1.0);});}}
if(index==(max-1)){}
else{LoadImage(index+1,max);}});}).error(function(){$curr.remove();LoadImage(index+1,max);}).attr('src',$images.eq(index).attr('src'));}}});$('.nitrografix-slideshow').nivoSlider({controlNav:false});$('.divider a').click(function(){$('html, body').animate({scrollTop:0},'slow');return false;});$(".flickr_badge_image").hover(function(){$(this).stop(true,true);$(this).animate({top:'-4px'});},function(){$(this).animate({top:'0px'});});$("#menu a").removeAttr('title');$("#menu ul:first ul li:first-child").css({paddingTop:'10px'});$("#menu ul:first ul li:last-child").css({paddingBottom:'10px',borderBottom:'1px solid #AAA'});$(".current_page_ancestor:first").addClass('current_page_root');var $socialbar=$('.social-icons');var socialbar_height=new Array();for(var i=0;i<$socialbar.length;i++){socialbar_height.push($socialbar.eq(i).children('div').height());}
$('.social-icons div').css({height:'35px'});$('.social-icons div').hover(function(){$(this).stop(true,true);$(this).animate({overflow:'visible',height:socialbar_height[$socialbar.index($(this).parent())]});},function(){$(this).animate({overflow:'hidden',height:'35px'});});});
