// JavaScript Document




//settings for drop down quickmenu
3var obj = null;
4function checkHover() {
5 if(obj) {
6 obj.find('ul').hide('fast');
7 $('.menuactive').addClass('menuselect').removeClass('menuactive');
8 }
9}
10$(document).ready(function() {
11// on ready functions for drop down quick menu
12 $(".submenu").hide();
13
14 $(".menuselect").hover(function(){
15 $(this).find('.submenu').show('fast');
16 $(this).addClass('menuactive').removeClass('menuselect');
17 return false;
18 }, function() {
19 obj = $(this);
20 setTimeout("checkHover()",400);
21 });
22
23//adds smooth scroll to pages. needs to be fixed to keep browser history
24 $('a[href^=#]:not([href=#])').click( function() {
25 var x = $(this.hash);
26 if( x.length ) {
27 $('html,body').animate( { scrollTop: x.offset().top - 20 }, 500 );
28
29 return false;
30 }
31 });
32
33//thumbnail hover effects
34 $('.imgover').hover(function() {
35 // $(this).find('.thumbclick').fadeIn('fast');
36 $(this).find('.thumbclick').animate({top:'179px'},{queue:false,duration:300});
37 $(this).find('.gi').animate({margin:'-27px 0 0 0'},{queue:false,duration:300});
38 }, function() {
39 $(this).find('.thumbclick').animate({top:'206px'},{queue:false,duration:300});
40 $(this).find('.gi').animate({margin:'0px 0 0 0'},{queue:false,duration:300});
41 });
42//basic fade opacity on button hover
43 $('.morebutton').hover(function() {
44 $(this).fadeTo('fast', 0.8);
45 }, function(){
46 $(this).fadeTo('fast', 1.0);
47 });
48
49//Validate contact form at bottom of page
50 $("#commentForm").validate();
51
52
53});