/* open external links in a new window by Brooke Bryan */ $("a[rel=ext],#infoWin input.submit").each(function(){ if($.browser.msie) { $(this).attr('target','_blank'); } else { $(this).attr('onclick','window.open(\''+ $(this).attr('href') +'\'); return false; '); } }); /* open external links in a new window */ /* top enquiry form animation */ function detectSplit() { var btntype = ""; if(btntype == 'split') { return "closeBtnsplit"; } else { return "closeBtn"; }; }; $('a.clickMe').click(function() { $('#enquiry:animated').stop(true); $('#enquiry').slideToggle('slow', function() { $('a.clickMe').queue(function() { $(this).toggleClass(detectSplit()); $(this).dequeue(); }); }); }); /* end top enquiry form animation */ /* Opacity fade on portfolio thumbnails */ $("img.hover").hover( function() { $(this).fadeTo("medium", 0); }, function() { $(this).fadeTo("medium", 1); }); /* End Opacity fade on portfolio thumbnails */ /* Homepage Promo Fade */ function slideSwitch() { var $active = $('#promo DIV.active'); if ( $active.length == 0 ) $active = $('#promo DIV:last'); // use this to pull the divs in the order they appear in the markup var $next = $active.next().length ? $active.next() : $('#promo DIV:first'); // uncomment below to pull the divs randomly // var $sibs = $active.siblings(); // var rndNum = Math.floor(Math.random() * $sibs.length ); // var $next = $( $sibs[ rndNum ] ); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 2000, function() { $active.removeClass('active last-active'); }); } $(function() { setInterval( "slideSwitch()", 9000 ); }); /* End Homepage Promo Fade */ /* Fade submit button and show sending quote div */ $('#quotSub').click( function() { $('#sendenq').removeClass("houdini"), $(this).fadeTo("medium", 0.5); }); /* End fade submit button and show sending quote div */ /* Google Maps API */ function initialize() { var latlng = new google.maps.LatLng(50.861632, -1.246605); var myOptions = { zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.BOTTOM_LEFT } }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var contentString = '