$(document).ready(function(){						   $('.welcome').cycle({		fx: 'scrollLeft',		timeout:         4000,		autostop:        1	});$('#map').cycle({     fx: 'scrollLeft',	timeout: 0,     speed:   300    //startingSlide: 1 });$('#gotoEdinburgh').click(function() {     $('#map').cycle(0);     return false; });  $('#gotoLondon').click(function() {      $('#map').cycle(1);      return false;  });//clients$('.eqcol').makeacolumnlists({cols: 3, colWidth: 0, equalHeight: 'false', startN: 1});$('li.client_info').each(function() {   $(this).qtip({      content: $(this).children('.tooltip'),      show: {effect: { type: 'fade', length : 400 }},      hide: { fixed: true, delay: 300 },      style: {       width: 120,      padding: 5,      background: '#FCFD1F',      color: 'black',      textAlign: 'center',      border: {         width: 0,         radius: 0,         color: '#FCFD1F'      },	  tip: 'topLeft'	  },	        position: {         corner: {            target: 'bottomLeft',            tooltip: 'topLeft'         }      }   });});$('.contactnames li.contact_info').each(function() {   $(this).qtip({      content: $(this).children('.tooltip'),      show: {effect: { type: 'fade', length : 400 }},      hide: { fixed: true, delay: 300 },      style: {       width: 160,      padding: 5,      background: '#FCFD1F',      color: 'black',      textAlign: 'center',      border: {         width: 0,         radius: 0,         color: '#FCFD1F'      },	  tip: 'leftTop'	  },	        position: {		  adjust: { x: -13, y: 0 },         corner: {            target: 'rightTop',            tooltip: 'leftTop'         }      }   });}); // since the qTip copies the content of the info div, you can remove it now$('li.client_info,  #contactnames li.contact_info').remove('.tooltip');$('.promogrid li, .sidepromogrid li, .fourgrid li').each(function() {/*var headerheight =  $('h4 a', this).css('height');$('.boxcaption .snippet', this).css('padding-top', headerheight);	*/var headerheight =  $('h4 a', this).innerHeight();$('.boxcaption .snippet', this).css('padding-top', headerheight);													 });$('.promogrid li, .sidepromogrid li, .fourgrid li').hover(function(){	$(".boxcaption", this).stop().animate({top:'0px', opacity:'0'}, 0)	.animate({opacity:'0.8'}, 500);}, function() {	$(".boxcaption", this).stop().animate({opacity:'0'},{queue:false,duration:160});});	});$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_square'});// initialise plugins		jQuery(function(){			jQuery('ul.sf-menu').superfish();		});				/*			 * stickyfloat - jQuery plugin for verticaly floating anything in a constrained area			 * 			 * Example: jQuery('#menu').stickyfloat({duration: 400});			 * parameters:			 * 		duration 	- the duration of the animation			 *		startOffset - the amount of scroll offset after it the animations kicks in			 *		offsetY		- the offset from the top when the object is animated			 *		lockBottom	- 'true' by default, set to false if you don't want your floating box to stop at parent's bottom			 * $Version: 05.16.2009 r1			 * Copyright (c) 2009 Yair Even-Or			 * vsync.design@gmail.com			 */			$.fn.stickyfloat = function(options, lockBottom) {				var $obj 				= this;				var parentPaddingTop 	= parseInt($obj.parent().css('padding-top'));				var startOffset 		= $obj.parent().offset().top;				var opts 				= $.extend({ startOffset: startOffset, offsetY: parentPaddingTop, duration: 200, lockBottom:true }, options);								$obj.css({ position: 'absolute' });								if(opts.lockBottom){					var bottomPos = $obj.parent().height() - $obj.height() + parentPaddingTop; //get the maximum scrollTop value					if( bottomPos < 0 )						bottomPos = 0;				}								$(window).scroll(function () { 					$obj.stop(); // stop all calculations on scroll event					var pastStartOffset			= $(document).scrollTop() > opts.startOffset;	// check if the window was scrolled down more than the start offset declared.					var objFartherThanTopPos	= $obj.offset().top > startOffset;	// check if the object is at it's top position (starting point)					var objBiggerThanWindow 	= $obj.outerHeight() < $(window).height();	// if the window size is smaller than the Obj size, then do not animate.										// if window scrolled down more than startOffset OR obj position is greater than					// the top position possible (+ offsetY) AND window size must be bigger than Obj size					if( (pastStartOffset || objFartherThanTopPos) && objBiggerThanWindow ){ 						var newpos = ($(document).scrollTop() -startOffset + opts.offsetY );						if ( newpos > bottomPos )							newpos = bottomPos;						if ( $(document).scrollTop() < opts.startOffset ) // if window scrolled < starting offset, then reset Obj position (opts.offsetY);							newpos = parentPaddingTop;									$obj.animate({ top: newpos }, opts.duration );					}				});			};if ($('#rightcol').length) { // implies *not* zero$('#rightcol').stickyfloat({ duration: 400 });  }				
