$(document).ready(function(){var a=$("#home").position().top;var d=$("#about").position().top;var e=$("#realisations").position().top;var b=$("#contact").position().top;function c(f){$("#menu a").not("#l_"+f).removeClass("current");var g=$("#l_"+f).attr("class");if(g!="current"){$("#l_"+f).addClass("current")}}$("#menu").localScroll();$("#top").localScroll();$(window).scroll(function(){var f=$(window).scrollTop();if(f>100){$("#top:hidden").fadeIn("slow")}else{$("#top:visible").fadeOut("slow")}if(f<d){c("home")}else{if(f>=d&&f<e){c("about")}else{if(f>=e&&f<b){c("realisations")}else{if(f>=b){c("contact")}}}}});$("#c_form").submit(function(h){$("#action").fadeIn("slow");h.preventDefault();var g=$('input[name="name"]').val(),f=$('input[name="email"]').val(),i=$('textarea[name="text"]').val();$.post("/index/request-post-contact",{name:g,email:f,text:i},function(k){var j=jQuery.parseJSON(k);if(j.success==1){$("#action").hide();$(":input","#c_form").not(":button, :submit, :reset, :hidden").val("");$("#error_name, #error_email, #error_text, #contact_form").hide();$("#send").fadeIn()}else{$("#action").hide();function l(m){if(j.errors[m]==1){$("#error_"+m).fadeIn("slow")}else{$("#error_"+m).fadeOut("slow")}}l("name");l("email");l("text")}})});$("#send_ok").click(function(){$("#send").hide();$("#contact_form").fadeIn()});$(".realisation").hover(function(){$(this).children("div").fadeIn("slow")},function(){$(".realisation div").fadeOut("slow")});$(".realisation").click(function(){$(".realisation div").hide()});$(".fancybox").fancybox({type:"iframe",showCloseButton:false,hideOnContentClick:true,width:700,height:300,padding:0,margin:0})});
var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24766191-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);
  })();
