                                                                                                                                                                           Cufon.replace('.navbar ul li a',{fontFamily: 'Junction'});
    Cufon.replace('h1',{fontFamily: 'GeosansLight',textShadow: '2px 2px #dddddd'});
    Cufon.replace('h2',{fontFamily: 'GeosansLight'});
    Cufon.replace('h3',{fontFamily: 'GeosansLight'});
    Cufon.replace('th',{fontFamily: 'Junction'});
    var curContent;
    function offsetDeploy(id) {
      curContent=id;
      $('#'+id).animate({left:'50%'});
    }
    function _offsetDeploy(id) {
      curContent=id;
      $('#'+id).animate({left:'50%'});
    }
    function refreshEvents() {  
    
			$("a[rel^='prettyPhoto']").prettyPhoto();
			
			$(".portfolio li a").wrap(function(){
        return '<div class="viewport" />' 
      });
      
                                     
          $('.viewport').mouseenter(function(e) {
        
        $(this).children('a').children('img').animate({'opacity':0.5},200);
    }).mouseleave(function(e) {
        
        $(this).children('a').children('img').animate({'opacity':1},200);
    });


  
      $('input').focusin(function() {
        $(this).animate({opacity:1},200);
      });
      
      $('input').focusout(function() {
        $(this).animate({opacity:0.7},200);
      });
      $('textarea').focusin(function() {
        $(this).animate({opacity:1},200);
      });
      $('textarea').focusout(function() {
        $(this).animate({opacity:0.7},200);
      });
      $('select').focusin(function() {
        $(this).animate({opacity:1},200);
      });
      $('select').focusout(function() {
        $(this).animate({opacity:0.7},200);
      });
      $('.fancy').mouseover(function() {
        $(this).animate({opacity:0.7},200);
      });
      $('.fancy').mouseout(function() {
        $(this).animate({opacity:1},200);
      });
      $('.footermenu li').mouseover(function() {
        $(this).css('backgroundColor','#555');
        $(this).css('color','#ddd');
      });
      $('.footermenu li').mouseout(function() {
        $(this).css('backgroundColor','#0a0a0a');  
        $(this).css('color','#ddd');
      });
      $('.navbar ul li a').click(function(){ 
        $('.navbar ul li').removeClass('sel');
        $(this).parent().addClass('sel'); 
        Cufon.refresh();
      });
        $(".rounded").load(function(){   
        $(this).wrap(function(){
        return '<span class="' + $(this).attr('class') + '" style="background:url(' + $(this).attr('src') + ') no-repeat center center; width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;" />'; });
        
        $(this).css("opacity","0");
        });
      $("ul li:last-child").css('border','none');
    } 
    $(window).load(function() {
    	$('#slider').coinslider({ width: 930, height:420, delay: 5000 });
    });

    function load(page,id,slideshow) {
    
    
    $.ajax({
      url: page,
      success: function(data) {
        
        $('.navbar ul li').removeClass('sel');
        $('#'+id+'-link').addClass('sel'); 
        
        $('#'+curContent).animate({left:'-100%'},500,function(){ 
        if(slideshow==false) {      
          $('#'+curContent).remove();
          $('.content').append(data);    
          refreshEvents();
          Cufon.refresh();             
          $('.slideshow').slideUp(300,function() { 
          offsetDeploy(id); 
          });
        } else { 
          $('.slideshow').slideDown(300,function() {
            $('#'+curContent).remove();
            $('.content').append(data);    
            refreshEvents();
            Cufon.refresh();       
            offsetDeploy(id); 
          });
        }
        
    });
  }
});
    }
    


