// Google Analytics
// --------------------------------
var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21897595-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();



// Begin jQuery scripts
// --------------------------------
$(document).ready(function() {
	
	
	// Page fade in
    // --------------------------------
    $("#Grid").addClass("Ani"); 

	// Optional message for form fields
    // --------------------------------
    $(".OptionalInput").each(function() {
        $(this).val($(this).attr("title"));
        $(this).css({ color: "#999999" });
    });

    $(".OptionalInput").focus(function() {
        if ($(this).val() == $(this).attr("title")) {
            $(this).val("");
            $(this).css({ color: "#666666" });
        }

    }).blur(function() {
        if ($(this).val() == "") {
            $(this).val($(this).attr("title"));
            $(this).css({ color: "#999999" });
        }
    });
    
    // Image at bottom
    // --------------------------------
  	var winHeight = $(window).height();
  	var winWidth = $(window).width();
  	
  	if ( winHeight >= 825 && winWidth >= 579 ) {	
  		$("#Footer").css("position","fixed");
  		$("#Footer").css("bottom","0px");
  		$("#Footer").css("left","0px");
  	} else {
  		$("#Footer").css("position","relative");
  	}
  	
  	
  	$(window).resize(function() {
  		var winHeight = $(window).height();	
  		var winWidth = $(window).width();
  		
  		if ( winHeight >= 825 && winWidth >= 579 ) {
	  		$("#Footer").css("position","fixed");
	  		$("#Footer").css("bottom","0px");
	  		$("#Footer").css("Left","0px");  			
  		} else {
  			$("#Footer").css("position","relative");
  		}
  		
  	});
    
});
