/*forms feedback*/
$(document).ready(function($){
        $('#myForm').ajaxForm(function(data) {
            if (data==1){
                $('#success').fadeIn("slow");
                $('#bademail').fadeOut("slow");
                $('#myForm').resetForm();
            }
            else if (data==2) $('#badserver').fadeIn("slow");
            else if (data==3) {
                $('#bademail').fadeIn("slow");
                $('#emaillabel').css("color","#D6010E");
                $('#emailinput').focus() .css("background","#FEEFB3");
            }
        });
    });




/*Back to top*/

$(document).ready(function() {  
 $(window).scroll(function() {  
  if($(this).scrollTop() != 0) {  
	$('#to-top').fadeIn();     
	} else {  
	$('#to-top').fadeOut();  
	}  
  });  
	$('#to-top').click(function() {  
	$('body,html').animate({scrollTop:0},900);  
  });   
});  


/*Colorbox*/
$(document).ready(function(){
  $("a[rel='gallery']").colorbox({transition:"none", width:"65%", height:"65%"});
  $("a[rel='residential']").colorbox({transition:"none", width:"65%", height:"65%"});
  $("a[rel='commercial']").colorbox({transition:"none", width:"65%", height:"65%"});
;
});
