
<!--
//Feel free to copy and modify this script, but please keep the comment lines!
//Written by Mattias Sjöberg 8/8-1996
//-----------------------------------------
//| mattias.sjoberg@swipnet.se |
//|---------------------------------------|
//| //\\ //\\ /// | |
//| // \\// \\ / | Advertise |
//|// \\ /// | |
//| Mattias / | Here |
//| Sjoberg /// | |
//|---------------------------------------|
//| www.geocities.com/SiliconValley/7116 |
//| Vote for my page the above URL |
//-----------------------------------------


var now = new Date();
var hours = now.getHours();
var psj=0;





//9-17 day
if (hours > 7 && hours < 12){
document.write('<body id="morning">')
}

//9-17 day
if (hours > 11 && hours < 16){
document.write('<body id="afternoon">')
}

//20-21 night
if (hours > 16 && hours < 22){
document.write('<body id="evening">')
}

//20-21 night
if (hours > 21 || hours < 8){
document.write('<body id="night">')
}




//-->






jQuery(document).ready(function(){

$("#services, #projects, #blog ").accordion({
		
		 autoheight: false
		 //event: 'mouseover'
												
		});

	});
    
    
$(function() {
		$("#tabs").tabs({ fx: { opacity: 'toggle' } });
		$("#footer-contact").tabs({ fx: { opacity: 'toggle' } });
		$("#footer-social").tabs({ fx: { opacity: 'toggle' } });
	});   
    
    
    
    
     $(document).ready(function(){
        $(".tweet").tweet({
            username: "door4",
            join_text: "auto",
            avatar_size: 32,
            count: 2,
            auto_join_text_default: "we said,",
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
            loading_text: "loading tweets..."
        });
    });
    
    
    
    
     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  function checkEmail(email) { 
    var pattern = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    var emailVal = $("#" + email).val();
    return pattern.test(emailVal);
  }
  $(function() {
    $("#subForm input:submit").click(function() { 
      
      // First, disable the form from submitting
      $('form#subForm').submit(function() { return false; });
      
      // Grab form action
      var formAction = $("form#subForm").attr("action");
      
      // Hacking together id for email field
      // Replace the xxxxx below:
      // If your form action were http://mysiteaddress.createsend.com/t/r/s/abcde/, then you'd enter "abcde" below
      var id = "kunjj";
      var emailId = id + "-" + id;
      
      // Validate email address with regex
      if (!checkEmail(emailId)) {
        alert("Please enter a valid email address");
        return;
      }
      
      // Serialize form values to be submitted with POST
      var str = $("form#subForm").serialize();
      
      // Add form action to end of serialized data
      // CDATA is used to avoid validation errors
      //<![CDATA[
      var serialized = str + "&action=" + formAction;
      // ]]>
      
      // Submit the form via ajax
      $.ajax({
        url: "proxy.php",
        type: "POST",
        data: serialized,
        success: function(data){
          // Server-side validation
          if (data.search(/invalid/i) != -1) {
            alert('The email address you supplied is invalid and needs to be fixed before you can subscribe to this list.');
          }
          else
          {
            $("#theForm").hide(); // If successfully submitted hides the form
            $("#confirmation").slideDown("slow");  // Shows "Thanks for subscribing" div
            $("#confirmation").tabIndex = -1;
            $("#confirmation").focus(); // For screen reader accessibility
            // Fire off Google Analytics fake pageview
            //var pageTracker = _gat._getTracker("UA-XXXXX-X");
            //pageTracker._trackPageview("/newsletter_signup");
          }
        }
      });
    });
  }); 
