/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2007-12-20 09:02:08 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4265 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */

(function($) {

$.event.special.mousewheel = {
	setup: function() {
		var handler = $.event.special.mousewheel.handler;
		
		// Fix pageX, pageY, clientX and clientY for mozilla
		if ( $.browser.mozilla )
			$(this).bind('mousemove.mousewheel', function(event) {
				$.data(this, 'mwcursorposdata', {
					pageX: event.pageX,
					pageY: event.pageY,
					clientX: event.clientX,
					clientY: event.clientY
				});
			});
	
		if ( this.addEventListener )
			this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = handler;
	},
	
	teardown: function() {
		var handler = $.event.special.mousewheel.handler;
		
		$(this).unbind('mousemove.mousewheel');
		
		if ( this.removeEventListener )
			this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = function(){};
		
		$.removeData(this, 'mwcursorposdata');
	},
	
	handler: function(event) {
		var args = Array.prototype.slice.call( arguments, 1 );
		
		event = $.event.fix(event || window.event);
		// Get correct pageX, pageY, clientX and clientY for mozilla
		$.extend( event, $.data(this, 'mwcursorposdata') || {} );
		var delta = 0, returnValue = true;
		
		if ( event.wheelDelta ) delta = event.wheelDelta/120;
		if ( event.detail     ) delta = -event.detail/3;
//		if ( $.browser.opera  ) delta = -event.wheelDelta;
		
		event.data  = event.data || {};
		event.type  = "mousewheel";
		
		// Add delta to the front of the arguments
		args.unshift(delta);
		// Add event to the front of the arguments
		args.unshift(event);

		return $.event.handle.apply(this, args);
	}
};

$.fn.extend({
	mousewheel: function(fn) {
		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
	},
	
	unmousewheel: function(fn) {
		return this.unbind("mousewheel", fn);
	}
});

})(jQuery);

/* Copyright (c) 2006 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id: jScrollPane.js 40 2009-01-11 19:38:04Z kelvin.luck $
 */

/**
 * Replace the vertical scroll bars on any matched elements with a fancy
 * styleable (via CSS) version. With JS disabled the elements will
 * gracefully degrade to the browsers own implementation of overflow:auto.
 * If the mousewheel plugin has been included on the page then the scrollable areas will also
 * respond to the mouse wheel.
 *
 * @example jQuery(".scroll-pane").jScrollPane();
 *
 * @name jScrollPane
 * @type jQuery
 * @param Object	settings	hash with options, described below.
 *								scrollbarWidth	-	The width of the generated scrollbar in pixels
 *								scrollbarMargin	-	The amount of space to leave on the side of the scrollbar in pixels
 *								wheelSpeed		-	The speed the pane will scroll in response to the mouse wheel in pixels
 *								showArrows		-	Whether to display arrows for the user to scroll with
 *								arrowSize		-	The height of the arrow buttons if showArrows=true
 *								animateTo		-	Whether to animate when calling scrollTo and scrollBy
 *								dragMinHeight	-	The minimum height to allow the drag bar to be
 *								dragMaxHeight	-	The maximum height to allow the drag bar to be
 *								animateInterval	-	The interval in milliseconds to update an animating scrollPane (default 100)
 *								animateStep		-	The amount to divide the remaining scroll distance by when animating (default 3)
 *								maintainPosition-	Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
 *								scrollbarOnLeft	-	Display the scrollbar on the left side?  (needs stylesheet changes, see examples.html)
 *								reinitialiseOnImageLoad - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded
 * @return jQuery
 * @cat Plugins/jScrollPane
 * @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 */

(function($) {

$.jScrollPane = {
	active : []
};
$.fn.jScrollPane = function(settings)
{
	settings = $.extend({}, $.fn.jScrollPane.defaults, settings);

	var rf = function() { return false; };
	
	return this.each(
		function()
		{
			var $this = $(this);
			// Switch the element's overflow to hidden to ensure we get the size of the element without the scrollbars [http://plugins.jquery.com/node/1208]
			$this.css('overflow', 'hidden');
			var paneEle = this;
			
			if ($(this).parent().is('.jScrollPaneContainer')) {
				var currentScrollPosition = settings.maintainPosition ? $this.position().top : 0;
				var $c = $(this).parent();
				var paneWidth = $c.innerWidth();
				var paneHeight = $c.outerHeight();
				var trackHeight = paneHeight;
				$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown', $c).remove();
				$this.css({'top':0});
			} else {
				var currentScrollPosition = 0;
				this.originalPadding = $this.css('paddingTop') + ' ' + $this.css('paddingRight') + ' ' + $this.css('paddingBottom') + ' ' + $this.css('paddingLeft');
				this.originalSidePaddingTotal = (parseInt($this.css('paddingLeft')) || 0) + (parseInt($this.css('paddingRight')) || 0);
				var paneWidth = $this.innerWidth();
				var paneHeight = $this.innerHeight();
				var trackHeight = paneHeight;
				$this.wrap(
					$('<div></div>').attr(
						{'className':'jScrollPaneContainer'}
					).css(
						{
							'height':paneHeight+'px', 
							'width':paneWidth+'px'
						}
					)
				);
				// deal with text size changes (if the jquery.em plugin is included)
				// and re-initialise the scrollPane so the track maintains the
				// correct size
				$(document).bind(
					'emchange', 
					function(e, cur, prev)
					{
						$this.jScrollPane(settings);
					}
				);
				
			}
			
			if (settings.reinitialiseOnImageLoad) {
				// code inspired by jquery.onImagesLoad: http://plugins.jquery.com/project/onImagesLoad
				// except we re-initialise the scroll pane when each image loads so that the scroll pane is always up to size...
				// TODO: Do I even need to store it in $.data? Is a local variable here the same since I don't pass the reinitialiseOnImageLoad when I re-initialise?
				var $imagesToLoad = $.data(paneEle, 'jScrollPaneImagesToLoad') || $('img', $this);
				var loadedImages = [];
				
				if ($imagesToLoad.length) {
					$imagesToLoad.each(function(i, val)	{
						$(this).bind('load', function() {
							if($.inArray(i, loadedImages) == -1){ //don't double count images
								loadedImages.push(val); //keep a record of images we've seen
								$imagesToLoad = $.grep($imagesToLoad, function(n, i) {
									return n != val;
								});
								$.data(paneEle, 'jScrollPaneImagesToLoad', $imagesToLoad);
								settings.reinitialiseOnImageLoad = false;
								$this.jScrollPane(settings); // re-initialise
							}
						}).each(function(i, val) {
							if(this.complete || this.complete===undefined) { 
								//needed for potential cached images
								this.src = this.src; 
							} 
						});
					});
				};
			}

			var p = this.originalSidePaddingTotal;
			
			var cssToApply = {
				'height':'auto',
				'width':paneWidth - settings.scrollbarWidth - settings.scrollbarMargin - p + 'px'
			}

			if(settings.scrollbarOnLeft) {
				cssToApply.paddingLeft = settings.scrollbarMargin + settings.scrollbarWidth + 'px';
			} else {
				cssToApply.paddingRight = settings.scrollbarMargin + 'px';
			}

			$this.css(cssToApply);

			var contentHeight = $this.outerHeight();
			var percentInView = paneHeight / contentHeight;

			if (percentInView < .99) {
				var $container = $this.parent();
				$container.append(
					$('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(
						$('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(
							$('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),
							$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'})
						)
					)
				);
				
				var $track = $('>.jScrollPaneTrack', $container);
				var $drag = $('>.jScrollPaneTrack .jScrollPaneDrag', $container);
				
				if (settings.showArrows) {
					
					var currentArrowButton;
					var currentArrowDirection;
					var currentArrowInterval;
					var currentArrowInc;
					var whileArrowButtonDown = function()
					{
						if (currentArrowInc > 4 || currentArrowInc%4==0) {
							positionDrag(dragPosition + currentArrowDirection * mouseWheelMultiplier);
						}
						currentArrowInc ++;
					};
					var onArrowMouseUp = function(event)
					{
						$('html').unbind('mouseup', onArrowMouseUp);
						currentArrowButton.removeClass('jScrollActiveArrowButton');
						clearInterval(currentArrowInterval);
					};
					var onArrowMouseDown = function() {
						$('html').bind('mouseup', onArrowMouseUp);
						currentArrowButton.addClass('jScrollActiveArrowButton');
						currentArrowInc = 0;
						whileArrowButtonDown();
						currentArrowInterval = setInterval(whileArrowButtonDown, 100);
					};
					$container
						.append(
							$('<a></a>')
								.attr({'href':'javascript:;', 'className':'jScrollArrowUp'})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll up')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = -1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf),
							$('<a></a>')
								.attr({'href':'javascript:;', 'className':'jScrollArrowDown'})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll down')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = 1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf)
						);
					var $upArrow = $('>.jScrollArrowUp', $container);
					var $downArrow = $('>.jScrollArrowDown', $container);
					if (settings.arrowSize) {
						trackHeight = paneHeight - settings.arrowSize - settings.arrowSize;
						$track
							.css({'height': trackHeight+'px', top:settings.arrowSize+'px'})
					} else {
						var topArrowHeight = $upArrow.height();
						settings.arrowSize = topArrowHeight;
						trackHeight = paneHeight - topArrowHeight - $downArrow.height();
						$track
							.css({'height': trackHeight+'px', top:topArrowHeight+'px'})
					}
				}
				
				var $pane = $(this).css({'position':'absolute', 'overflow':'visible'});
				
				var currentOffset;
				var maxY;
				var mouseWheelMultiplier;
				// store this in a seperate variable so we can keep track more accurately than just updating the css property..
				var dragPosition = 0;
				var dragMiddle = percentInView*paneHeight/2;
				
				// pos function borrowed from tooltip plugin and adapted...
				var getPos = function (event, c) {
					var p = c == 'X' ? 'Left' : 'Top';
					return event['page' + c] || (event['client' + c] + (document.documentElement['scroll' + p] || document.body['scroll' + p])) || 0;
				};
				
				var ignoreNativeDrag = function() {	return false; };
				
				var initDrag = function()
				{
					ceaseAnimation();
					currentOffset = $drag.offset(false);
					currentOffset.top -= dragPosition;
					maxY = trackHeight - $drag[0].offsetHeight;
					mouseWheelMultiplier = 2 * settings.wheelSpeed * maxY / contentHeight;
				};
				
				var onStartDrag = function(event)
				{
					initDrag();
					dragMiddle = getPos(event, 'Y') - dragPosition - currentOffset.top;
					$('html').bind('mouseup', onStopDrag).bind('mousemove', updateScroll);
					if ($.browser.msie) {
						$('html').bind('dragstart', ignoreNativeDrag).bind('selectstart', ignoreNativeDrag);
					}
					return false;
				};
				var onStopDrag = function()
				{
					$('html').unbind('mouseup', onStopDrag).unbind('mousemove', updateScroll);
					dragMiddle = percentInView*paneHeight/2;
					if ($.browser.msie) {
						$('html').unbind('dragstart', ignoreNativeDrag).unbind('selectstart', ignoreNativeDrag);
					}
				};
				var positionDrag = function(destY)
				{
					destY = destY < 0 ? 0 : (destY > maxY ? maxY : destY);
					dragPosition = destY;
					$drag.css({'top':destY+'px'});
					var p = destY / maxY;
					$pane.css({'top':((paneHeight-contentHeight)*p) + 'px'});
					$this.trigger('scroll');
					if (settings.showArrows) {
						$upArrow[destY == 0 ? 'addClass' : 'removeClass']('disabled');
						$downArrow[destY == maxY ? 'addClass' : 'removeClass']('disabled');
					}
				};
				var updateScroll = function(e)
				{
					positionDrag(getPos(e, 'Y') - currentOffset.top - dragMiddle);
				};
				
				var dragH = Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2), settings.dragMaxHeight), settings.dragMinHeight);
				
				$drag.css(
					{'height':dragH+'px'}
				).bind('mousedown', onStartDrag);
				
				var trackScrollInterval;
				var trackScrollInc;
				var trackScrollMousePos;
				var doTrackScroll = function()
				{
					if (trackScrollInc > 8 || trackScrollInc%4==0) {
						positionDrag((dragPosition - ((dragPosition - trackScrollMousePos) / 2)));
					}
					trackScrollInc ++;
				};
				var onStopTrackClick = function()
				{
					clearInterval(trackScrollInterval);
					$('html').unbind('mouseup', onStopTrackClick).unbind('mousemove', onTrackMouseMove);
				};
				var onTrackMouseMove = function(event)
				{
					trackScrollMousePos = getPos(event, 'Y') - currentOffset.top - dragMiddle;
				};
				var onTrackClick = function(event)
				{
					initDrag();
					onTrackMouseMove(event);
					trackScrollInc = 0;
					$('html').bind('mouseup', onStopTrackClick).bind('mousemove', onTrackMouseMove);
					trackScrollInterval = setInterval(doTrackScroll, 100);
					doTrackScroll();
				};
				
				$track.bind('mousedown', onTrackClick);
				
				$container.bind(
					'mousewheel',
					function (event, delta) {
						initDrag();
						ceaseAnimation();
						var d = dragPosition;
						positionDrag(dragPosition - delta * mouseWheelMultiplier);
						var dragOccured = d != dragPosition;
						return !dragOccured;
					}
				);

				var _animateToPosition;
				var _animateToInterval;
				function animateToPosition()
				{
					var diff = (_animateToPosition - dragPosition) / settings.animateStep;
					if (diff > 1 || diff < -1) {
						positionDrag(dragPosition + diff);
					} else {
						positionDrag(_animateToPosition);
						ceaseAnimation();
					}
				}
				var ceaseAnimation = function()
				{
					if (_animateToInterval) {
						clearInterval(_animateToInterval);
						delete _animateToPosition;
					}
				};
				var scrollTo = function(pos, preventAni)
				{
					if (typeof pos == "string") {
						$e = $(pos, $this);
						if (!$e.length) return;
						pos = $e.offset().top - $this.offset().top;
					}
					$container.scrollTop(0);
					ceaseAnimation();
					var maxScroll = contentHeight - paneHeight;
					pos = pos > maxScroll ? maxScroll : pos;
					var destDragPosition = pos/maxScroll * maxY;
					if (preventAni || !settings.animateTo) {
						positionDrag(destDragPosition);
					} else {
						_animateToPosition = destDragPosition;
						_animateToInterval = setInterval(animateToPosition, settings.animateInterval);
					}
				};
				$this[0].scrollTo = scrollTo;
				
				$this[0].scrollBy = function(delta)
				{
					var currentPos = -parseInt($pane.css('top')) || 0;
					scrollTo(currentPos + delta);
				};
				
				initDrag();
				
				scrollTo(-currentScrollPosition, true);
			
				// Deal with it when the user tabs to a link or form element within this scrollpane
				$('*', this).bind(
					'focus',
					function(event)
					{
						var $e = $(this);
						
						// loop through parents adding the offset top of any elements that are relatively positioned between
						// the focused element and the jScrollPaneContainer so we can get the true distance from the top
						// of the focused element to the top of the scrollpane...
						var eleTop = 0;
						
						while ($e[0] != $this[0]) {
							eleTop += $e.position().top;
							$e = $e.offsetParent();
						}
						
						var viewportTop = -parseInt($pane.css('top')) || 0;
						var maxVisibleEleTop = viewportTop + paneHeight;
						var eleInView = eleTop > viewportTop && eleTop < maxVisibleEleTop;
						if (!eleInView) {
							var destPos = eleTop - settings.scrollbarMargin;
							if (eleTop > viewportTop) { // element is below viewport - scroll so it is at bottom.
								destPos += $(this).height() + 15 + settings.scrollbarMargin - paneHeight;
							}
							scrollTo(destPos);
						}
					}
				)
				
				
				if (location.hash) {
					scrollTo(location.hash);
				}
				
				// use event delegation to listen for all clicks on links and hijack them if they are links to
				// anchors within our content...
				$(document).bind(
					'click',
					function(e)
					{
						$target = $(e.target);
						if ($target.is('a')) {
							var h = $target.attr('href');
							if (h.substr(0, 1) == '#') {
								scrollTo(h);
							}
						}
					}
				);
				
				$.jScrollPane.active.push($this[0]);
				
			} else {
				$this.css(
					{
						'height':paneHeight+'px',
						'width':paneWidth-this.originalSidePaddingTotal+'px',
						'padding':this.originalPadding
					}
				);
				// remove from active list?
				$this.parent().unbind('mousewheel');
			}
			
		}
	)
};

$.fn.jScrollPaneRemove = function()
{
	$(this).each(function()
	{
		$this = $(this);
		var $c = $this.parent();
		if ($c.is('.jScrollPaneContainer')) {
			$this.css(
				{
					'top':'',
					'height':'',
					'width':'',
					'padding':'',
					'overflow':'',
					'position':''
				}
			);
			$c.after($this).remove();
		}
	});
}

$.fn.jScrollPane.defaults = {
	scrollbarWidth : 10,
	scrollbarMargin : 5,
	wheelSpeed : 18,
	showArrows : false,
	arrowSize : 0,
	animateTo : false,
	dragMinHeight : 1,
	dragMaxHeight : 99999,
	animateInterval : 100,
	animateStep: 3,
	maintainPosition: true,
	scrollbarOnLeft: false,
	reinitialiseOnImageLoad: false
};

// clean up the scrollTo expandos
$(window)
	.bind('unload', function() {
		var els = $.jScrollPane.active; 
		for (var i=0; i<els.length; i++) {
			els[i].scrollTo = els[i].scrollBy = null;
		}
	}
);

})(jQuery);

/**
 * History/Remote - jQuery plugin for enabling history support and bookmarking
 * @requires jQuery v1.0.3
 *
 * http://stilbuero.de/jquery/history/
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 0.2.3
 */

(function($) { // block scope

/**
 * Initialize the history manager. Subsequent calls will not result in additional history state change 
 * listeners. Should be called soonest when the DOM is ready, because in IE an iframe needs to be added
 * to the body to enable history support.
 *
 * @example $.ajaxHistory.initialize();
 *
 * @param Function callback A single function that will be executed in case there is no fragment
 *                          identifier in the URL, for example after navigating back to the initial
 *                          state. Use to restore such an initial application state.
 *                          Optional. If specified it will overwrite the default action of 
 *                          emptying all containers that are used to load content into.
 * @type undefined
 *
 * @name $.ajaxHistory.initialize()
 * @cat Plugins/History
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
$.ajaxHistory = new function() {

    var RESET_EVENT = 'historyReset';

    var _currentHash = location.hash;
    var _intervalId = null;
    var _observeHistory; // define outside if/else required by Opera

    this.update = function() { }; // empty function body for graceful degradation

    // create custom event for state reset
    var _defaultReset = function() {
        $('.remote-output').empty();
    };
    $(document).bind(RESET_EVENT, _defaultReset);
    
    // TODO fix for Safari 3
    // if ($.browser.msie)
    // else if hash != _currentHash
    // else check history length

    if ($.browser.msie) {

        var _historyIframe, initialized = false; // for IE

        // add hidden iframe
        $(function() {
            _historyIframe = $('<iframe style="display: none;"></iframe>').appendTo(document.body).get(0);
            var iframe = _historyIframe.contentWindow.document;
            // create initial history entry
            iframe.open();
            iframe.close();
            if (_currentHash && _currentHash != '#') {
                iframe.location.hash = _currentHash.replace('#', '');
            }
        });

        this.update = function(hash) {
            _currentHash = hash;
            var iframe = _historyIframe.contentWindow.document;
            iframe.open();
            iframe.close();
            iframe.location.hash = hash.replace('#', '');
        };

        _observeHistory = function() {
            var iframe = _historyIframe.contentWindow.document;
            var iframeHash = iframe.location.hash;
            if (iframeHash != _currentHash) {
                _currentHash = iframeHash;
                if (iframeHash && iframeHash != '#') {
                    // order does matter, set location.hash after triggering the click...
                    $('a[@href$="' + iframeHash + '"]').click();
                    location.hash = iframeHash;
                } else if (initialized) {
                    location.hash = '';
                    $(document).trigger(RESET_EVENT);
                }
            }
            initialized = true;
        };

    } else if ($.browser.mozilla || $.browser.opera) {

//        this.update = function(hash) {
//            _currentHash = hash;
//        };

        _observeHistory = function() {
            if (location.hash) {
                if (_currentHash != location.hash) {
                    _currentHash = location.hash;
                    $('a[@href$="' + _currentHash + '"]').click();
                }
            } else if (_currentHash) {
                _currentHash = '';
                $(document).trigger(RESET_EVENT);
            }
        };

    } else if ($.browser.safari) {

        var _backStack, _forwardStack, _addHistory; // for Safari

        // etablish back/forward stacks
        $(function() {
            _backStack = [];
            _backStack.length = history.length;
            _forwardStack = [];

        });
        var isFirst = false, initialized = false;
        _addHistory = function(hash) {
            _backStack.push(hash);
            _forwardStack.length = 0; // clear forwardStack (true click occured)
            isFirst = false;
        };

        this.update = function(hash) {
            _currentHash = hash;
            _addHistory(_currentHash);
        };

        _observeHistory = function() {
            var historyDelta = history.length - _backStack.length;
            if (historyDelta) { // back or forward button has been pushed
                isFirst = false;
                if (historyDelta < 0) { // back button has been pushed
                    // move items to forward stack
                    for (var i = 0; i < Math.abs(historyDelta); i++) _forwardStack.unshift(_backStack.pop());
                } else { // forward button has been pushed
                    // move items to back stack
                    for (var i = 0; i < historyDelta; i++) _backStack.push(_forwardStack.shift());
                }
                var cachedHash = _backStack[_backStack.length - 1];
                $('a[@href$="' + cachedHash + '"]').click();
                _currentHash = location.hash;
            } else if (_backStack[_backStack.length - 1] == undefined && !isFirst) {
                // back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
                // document.URL doesn't change in Safari
                if (document.URL.indexOf('#') >= 0) {
                    $('a[@href$="' + '#' + document.URL.split('#')[1] + '"]').click();
                } else if (initialized) {
                    $(document).trigger(RESET_EVENT);
                }
                isFirst = true;
            }
            initialized = true;
        };

    }

    this.initialize = function(callback) {
        // custom callback to reset app state (no hash in url)
        if (typeof callback == 'function') {
            $(document).unbind(RESET_EVENT, _defaultReset).bind(RESET_EVENT, callback);
        }
        // look for hash in current URL (not Safari)
        if (location.hash && typeof _addHistory == 'undefined') {
            $('a[@href$="' + location.hash + '"]').trigger('click');
        }
        // start observer
        if (_observeHistory && _intervalId == null) {
            _intervalId = setInterval(_observeHistory, 200); // Safari needs at least 200 ms
        }
    };

};

/**
 * Implement Ajax driven links in a completely unobtrusive and accessible manner (also known as "Hijax")
 * with support for the browser's back/forward navigation buttons and bookmarking.
 *
 * The link's href attribute gets altered to a fragment identifier, such as "#remote-1", so that the browser's
 * URL gets updated on each click, whereas the former value of that attribute is used to load content via
 * XmlHttpRequest from and update the specified element. If no target element is found, a new div element will be
 * created and appended to the body to load the content into. The link informs the history manager of the 
 * state change on click and adds an entry to the browser's history.
 *
 * jQuery's Ajax implementation adds a custom request header of the form "X-Requested-With: XmlHttpRequest"
 * to any Ajax request so that the called page can distinguish between a standard and an Ajax (XmlHttpRequest)
 * request.
 *
 * @example $('a.remote').remote('#output');
 * @before <a class="remote" href="/path/to/content.html">Update</a>
 * @result <a class="remote" href="#remote-1">Update</a>
 * @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from
 *       "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
 * @example $('a.remote').remote('#output', {hashPrefix: 'chapter'});
 * @before <a class="remote" href="/path/to/content.html">Update</a>
 * @result <a class="remote" href="#chapter-1">Update</a>
 * @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from
 *       "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
 *
 * @param String expr A string containing a CSS selector or basic XPath specifying the element to load
 *                    content into via XmlHttpRequest.
 * @param Object settings An object literal containing key/value pairs to provide optional settings.
 * @option String hashPrefix A String that is used for constructing the hash the link's href attribute
 *                           gets altered to, such as "#remote-1". Default value: "remote-".
 * @param Function callback A single function that will be executed when the request is complete. 
 * @type jQuery
 *
 * @name remote
 * @cat Plugins/Remote
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Implement Ajax driven links in a completely unobtrusive and accessible manner (also known as "Hijax")
 * with support for the browser's back/forward navigation buttons and bookmarking.
 *
 * The link's href attribute gets altered to a fragment identifier, such as "#remote-1", so that the browser's
 * URL gets updated on each click, whereas the former value of that attribute is used to load content via
 * XmlHttpRequest from and update the specified element. If no target element is found, a new div element will be
 * created and appended to the body to load the content into. The link informs the history manager of the 
 * state change on click and adds an entry to the browser's history.
 *
 * jQuery's Ajax implementation adds a custom request header of the form "X-Requested-With: XmlHttpRequest"
 * to any Ajax request so that the called page can distinguish between a standard and an Ajax (XmlHttpRequest)
 * request.
 *
 * @example $('a.remote').remote( $('#output > div')[0] );
 * @before <a class="remote" href="/path/to/content.html">Update</a>
 * @result <a class="remote" href="#remote-1">Update</a>
 * @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from
 *       "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
 * @example $('a.remote').remote('#output', {hashPrefix: 'chapter'});
 * @before <a class="remote" href="/path/to/content.html">Update</a>
 * @result <a class="remote" href="#chapter-1">Update</a>
 * @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from
 *       "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
 *
 * @param Element elem A DOM element to load content into via XmlHttpRequest.
 * @param Object settings An object literal containing key/value pairs to provide optional settings.
 * @option String hashPrefix A String that is used for constructing the hash the link's href attribute
 *                           gets altered to, such as "#remote-1". Default value: "remote-".
 * @param Function callback A single function that will be executed when the request is complete. 
 * @type jQuery
 *
 * @name remote
 * @cat Plugins/Remote
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
$.fn.remote = function(output, settings, callback) {

    callback = callback || function() {};
    if (typeof settings == 'function') { // shift arguments
        callback = settings;
    }
    
    settings = $.extend({
        hashPrefix: 'remote-'
    }, settings || {});

    var target = $(output).size() && $(output) || $('<div></div>').appendTo('body');
    target.addClass('remote-output');

    return this.each(function(i) {
        var href = this.href, hash = '#' + (this.title && this.title.replace(/\s/g, '_') || settings.hashPrefix + (i + 1)),
            a = this;
        this.href = hash;
        $(this).click(function(e) {
            // lock target to prevent double loading in Firefox
            if (!target['locked']) {
                // add to history only if true click occured, not a triggered click
                if (e.clientX) {
                    $.ajaxHistory.update(hash);
                }
                target.load(href, function() {
                    target['locked'] = null;
                    callback.apply(a);
                });
            }
        });
    });

};

/**
 * Provides the ability to use the back/forward navigation buttons in a DHTML application.
 * A change of the application state is reflected by a change of the URL fragment identifier.
 *
 * The link's href attribute needs to point to a fragment identifier within the same resource,
 * although that fragment id does not need to exist. On click the link changes the URL fragment
 * identifier, informs the history manager of the state change and adds an entry to the browser's
 * history.
 *
 * @param Function callback A single function that will be executed as the click handler of the 
 *                          matched element. It will be executed on click (adding an entry to 
 *                          the history) as well as in case the history manager needs to trigger 
 *                          it depending on the value of the URL fragment identifier, e.g. if its 
 *                          current value matches the href attribute of the matched element.
 *                           
 * @type jQuery
 *
 * @name history
 * @cat Plugins/History
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
$.fn.history = function(callback) {
    return this.click(function(e) {        
		// add to history only if true click occured,
		// not a triggered click...
        if (e.clientX) {
	        // ...and die if already active
			if (this.hash == location.hash) {
				return false;
			} 
           	$.ajaxHistory.update(this.hash);
        }
		if (typeof callback == 'function') {
			callback.call(this);
		}
    });
};

})(jQuery);

/*

var logger;
jQuery(function() {
    logger = jQuery('<div style="position: fixed; top: 0; overflow: hidden; border: 1px solid; padding: 3px; width: 120px; height: 150px; background: #000; color: #f00;"></div>').appendTo(document.body);
});
function log(m) {    
    logger.prepend(m + '<br />');
};


*/

if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10]||"";},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=[];var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
jQuery.fn.delay = function(time,func){
	return this.each(function(){
		setTimeout(func,time);
	});
};



 // tooltip:
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = -10;
		yOffset = 15;		
	
	jQuery("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		jQuery("#tooltip").remove();
    });	
	jQuery("a.tooltip").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
}; //  /tooltip

var subheader = "#latest-sub-header, #about-sub-header, #what-sub-header, #how-sub-header, #cost-sub-header, #news-sub-header, #contact-sub-header";

var thumbnails = "#thumbnail1, #thumbnail2, #thumbnail3, #thumbnail4, #thumbnail5, #thumbnail6, #thumbnail7, #thumbnail8, #thumbnail9, #thumbnail10";

var largeimages = "#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10";

var nav = "#our-latest-work-nav, #about-us-nav, #what-we-do-nav, #how-we-work-nav, #cost-nav, #news-nav, #contact-us-nav";

var entrypage = location.hash;

jQuery(document).ready(function(jQuery){
jQuery.ajaxHistory.initialize(function(){
jQuery("#main-container").animate({width: "175px"});jQuery("#main-container-background").animate({width: "175px"});	jQuery("#main-content-background").animate({width: "0px"});	jQuery("#main-page-content").animate({width: "0px"});	jQuery("#background-close").animate({left: "0px"});		jQuery("#close-btn").hide(0);jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(500);jQuery("#our-latest-work-nav, #about-us-nav, #what-we-do-nav, #how-we-work-nav, #cost-nav, #news-nav, #contact-us-nav").removeClass("selected");  jQuery("#our-latest-work-nav, #about-us-nav, #what-we-do-nav, #how-we-work-nav, #cost-nav, #news-nav, #contact-us-nav").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});		
});

tooltip();

jQuery(function() {jQuery('#scrollbox, .page-content').jScrollPane({dragMaxHeight:13, dragMinHeight: 13, scrollbarWidth:12, showArrows:true} );});


//initial settings 
  
jQuery(".page-content").css({marginLeft: '0%'});
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10, #contact-overlay-box").hide();
jQuery("#main-container-background").show().css({opacity: 0.75});
jQuery("#single-page-background, #single-page-navigation-background, .image-info-bg, .portfolio-website-info-bg, .portfolio-design-info-bg").show().css({opacity: 0.85});
jQuery("#main-content-background").show().css({opacity: 0.4});
jQuery("hr").show().css({opacity: 0.25});
jQuery(".homepage-list-details").show().css({opacity: 0.3});          
jQuery(".thumbnail-unselected").show().css({opacity: 0.5});
jQuery(".thumbnail-selected").css({opacity: 1});
jQuery("#comments").css({opacity: 0.50});
jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section, #close-btn, .quote-callback, #contact-overlay").hide();
jQuery("#contact-overlay, #brief-overlay").css({opacity: 0.75});
jQuery("#brief-overlay, #brief-overlay-box, #loading-overlay").hide();
// ENTRY ***********************

if (entrypage == "#recent-work" || entrypage == "#recent-work/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = 'Website Design Brighton - Some of Our Recent Work';
}; // .entry

if (entrypage == "#recent-work/example-1" || entrypage == "#recent-work/example-1/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail1").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image1").fadeIn(1000);
document.title = websitetitles[0]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-2" || entrypage == "#recent-work/example-2/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail2").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image2").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[1]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-3" || entrypage == "#recent-work/example-3/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail3").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image3").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[2]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-4" || entrypage == "#recent-work/example-4/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail4").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image4").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[3]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-5" || entrypage == "#recent-work/example-5/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail5").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image5").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[4]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-6" || entrypage == "#recent-work/example-6/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail6").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image6").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[5]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-7" || entrypage == "#recent-work/example-7/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail7").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image7").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[6]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-8" || entrypage == "#recent-work/example-8/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail8").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image8").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[7]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-9" || entrypage == "#recent-work/example-8/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail9").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image9").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[8]+' - Created by Website Design Brighton';
}; // .entry

if (entrypage == "#recent-work/example-10" || entrypage == "#recent-work/example-10/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); jQuery("#thumbnail10").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);jQuery(largeimages).fadeOut(1000); jQuery("#wdb-large-logo").animate({opacity: 1}, 500);jQuery("#large-image10").fadeIn(1000);jQuery("#close-btn").fadeIn(1500);
document.title = websitetitles[9]+' - Created by Website Design Brighton';
}; // .entry
	          
if (entrypage == "#about-us" || entrypage == "#about-us/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#about-us-nav").removeClass("unselected").addClass("selected");
jQuery("#about-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});			
jQuery("#about-us-section").fadeIn(1000);
document.title = 'Website Design Brighton - About Us';
}; // .entry
	
if (entrypage == "#what-we-do" || entrypage == "#what-we-do/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#what-we-do-nav").removeClass("unselected").addClass("selected");
jQuery("#what-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});		
jQuery("#what-we-do-section").fadeIn(1000);
document.title = 'Website Design Brighton - What We Do';
}; // .entry
	
if (entrypage == "#how-we-work" || entrypage == "#how-we-work/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#how-we-work-nav").removeClass("unselected").addClass("selected");
jQuery("#how-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#how-we-work-section").fadeIn(1000);
document.title = 'Website Design Brighton - How We Work';
}; // .entry
	
if (entrypage == "#our-prices" || entrypage == "#our-prices/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#cost-nav").removeClass("unselected").addClass("selected");
jQuery("#cost-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 			
jQuery("#cost-section").fadeIn(1000);
document.title = 'Website Design Brighton - Our Prices';
}; // .entry
	
if (entrypage == "#wdb-news" || entrypage == "#wdb-news/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#news-nav").removeClass("unselected").addClass("selected");
jQuery("#news-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#wdb-news-section").fadeIn(1000);
document.title = 'Website Design Brighton - News';
}; // .entry
	
if (entrypage == "#contact-us" || entrypage == "#contact-us/") {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#contact-us-nav").removeClass("unselected").addClass("selected");
jQuery("#contact-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#contact-us-section").fadeIn(1000);
document.title = 'Website Design Brighton - Contact Us';
}; // .entry



//HISTORY    *******************


jQuery("a.work-nav, a.work-link").history(function(){
jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
		jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");
jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});		
jQuery("#latest-work-section").fadeIn(1000);
document.title = 'Website Design Brighton - Some of Our Recent Work';
}); // .history
	          
jQuery("a.about-nav").history(function(){
jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
		jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
jQuery("#about-us-nav").removeClass("unselected").addClass("selected");
jQuery("#about-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});			
jQuery("#about-us-section").fadeIn(1000);
document.title = 'Website Design Brighton - About Us';
}); // .history
	
  jQuery("a.what-nav, a.what-link").history(function(){
  jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
  		jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
jQuery("#what-we-do-nav").removeClass("unselected").addClass("selected");
jQuery("#what-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});		
jQuery("#what-we-do-section").fadeIn(1000);
document.title = 'Website Design Brighton - What We Do';
}); // .history
	
	jQuery("a.how-nav, a.how-link").history(function(){
	jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);
			jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
jQuery("#how-we-work-nav").removeClass("unselected").addClass("selected");
jQuery("#how-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#how-we-work-section").fadeIn(1000);
document.title = 'Website Design Brighton - How We Work';
}); // .history
	
	jQuery("a.prices-nav, a.prices-link").history(function(){
	jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #wdb-news-section, #contact-us-section").fadeOut(750);
jQuery("#cost-nav").removeClass("unselected").addClass("selected");
jQuery("#cost-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 			
jQuery("#cost-section").fadeIn(1000);
document.title = 'Website Design Brighton - Our Prices';
}); // .history
	
	jQuery("a.wdb-news-nav").history(function(){
	jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #contact-us-section").fadeOut(750);
jQuery("#news-nav").removeClass("unselected").addClass("selected");
jQuery("#news-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#wdb-news-section").fadeIn(1000);
document.title = 'Website Design Brighton - News';
}); // .history
	
	jQuery("a.contact-nav, a.contact-link, a.quote-contact-link, a.brief-quote-contact-link").history(function(){
	jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});jQuery("#close-btn").fadeIn(1500); jQuery(nav).removeClass("selected").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section").fadeOut(750);
			jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
jQuery("#contact-us-nav").removeClass("unselected").addClass("selected");
jQuery("#contact-sub-header").removeClass("sub-unselected").css({'color' : '#fff'}); 		
jQuery("#contact-us-section").fadeIn(1000);
document.title = 'Website Design Brighton - Contact Us';
}); // .history
	

// MAIN NAV ROLLOVER  *****************************


jQuery("#our-latest-work-nav a, #our-latest-work-sub-nav a").hover(function(){ 
  jQuery("#latest-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#latest-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#latest-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#latest-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#about-us-nav a, #about-us-sub-nav a").hover(function(){ 
  jQuery("#about-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#about-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#about-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#about-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#what-we-do-nav a, #what-we-do-sub-nav a").hover(function(){ 
  jQuery("#what-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#what-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#what-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#what-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#how-we-work-nav a, #how-we-work-sub-nav a").hover(function(){ 
  jQuery("#how-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#how-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#how-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#how-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#cost-nav a, #cost-sub-nav a").hover(function(){ 
  jQuery("#cost-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#cost-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#cost-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#cost-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#news-nav a, #news-sub-nav a").hover(function(){ 
  jQuery("#news-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#news-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#news-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#news-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover

jQuery("#contact-us-nav a, #contact-us-sub-nav a").hover(function(){ 
  jQuery("#contact-sub-header.sub-unselected").css({'color' : '#faeada'});
    jQuery("#contact-sub-sub-header.sub-unselected").css({'color' : '#faeada'});
},function(){ 
jQuery("#contact-sub-header.sub-unselected").css({'color' : '#999999'});
jQuery("#contact-sub-sub-header.sub-unselected").css({'color' : '#999999'});
}); //  .hover	



//HOMEPAGE OPTIONS ROLLOVERS    *******************

jQuery(".brighton-web-design-icon").bind("mouseenter",function(){
jQuery('#brighton-web-design-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#brighton-web-design-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".our-prices-icon").bind("mouseenter",function(){
jQuery('#prices-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#prices-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".ten-years-experience-icon").bind("mouseenter",function(){
jQuery('#years-experience-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#years-experience-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".personal-touch-icon").bind("mouseenter",function(){
jQuery('#personal-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#personal-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".environmentally-friendly-icon").bind("mouseenter",function(){
jQuery('#environment-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#environment-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".competitive-prices-icon").bind("mouseenter",function(){
jQuery('#competitive-prices-details').stop().animate({opacity: '1'},250);
jQuery(".competitive-prices-icon").css({
'cursor': 'default'});
}).bind("mouseleave",function(){
jQuery('#competitive-prices-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".guaranteed-price-icon").bind("mouseenter",function(){
jQuery('#guaranteed-price-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#guaranteed-price-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".flexible-price-icon").bind("mouseenter",function(){
jQuery('#flexible-price-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#flexible-price-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".training-icon").bind("mouseenter",function(){
jQuery('#training-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#training-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".support-icon").bind("mouseenter",function(){
jQuery('#support-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#support-details').animate({opacity: '0.3'}, 350);
});  // .hover
		
jQuery(".website-design-and-redesign-icon").bind("mouseenter",function(){
jQuery('#website-design-and-redesign-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#website-design-and-redesign-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".website-hosting-icon").bind("mouseenter",function(){
jQuery('#website-hosting-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#website-hosting-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".content-management-icon").bind("mouseenter",function(){
jQuery('#content-management-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#content-management-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".website-functionality-icon").bind("mouseenter",function(){
jQuery('#website-functionality-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#website-functionality-details').animate({opacity: '0.3'}, 350);
});  // .hover

jQuery(".search-engine-optimisation-icon").bind("mouseenter",function(){
jQuery('#search-engine-optimisation-details').stop().animate({opacity: '1'},250);
}).bind("mouseleave",function(){
jQuery('#search-engine-optimisation-details').animate({opacity: '0.3'}, 350);
});  // .hover


 
jQuery('#form-name, #form-email, #message-area, #call-name, #call-num, #message-area, #yourname, #youremail, #yourremarks, #friendname, #friendemail, #imageverify, #comment, #comment, #author, #email, #url').hover(function(){ 
jQuery(this).css({'background': '#fff',
'border': 'solid 1px #ff8302'});
},function(){ 
jQuery(this).css({'background': '#faeada',
'border': 'solid 1px #fff'});
 }); //  .hover

jQuery('#call-back-close-btn, #brief-close-btn').hover(function(){ 
jQuery(this).css({'color': '#ff8302',
'cursor': 'pointer'});
},function(){ 
jQuery(this).css({'color': '#faeada'});
 }); //  .hover
    
jQuery(".thumbnail-unselected").hover(function () {
jQuery(this).stop().animate({opacity: 1}, 250);
}, function () {
jQuery(".thumbnail-unselected").stop().animate({opacity: 0.50}, 500);
}); //  .hover

	jQuery("#thumbnail1 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail1").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image1").fadeIn(1000);
document.title = websitetitles[0]+' - Created by Website Design Brighton';
});

	jQuery("#thumbnail2 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail2").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image2").fadeIn(1000);
document.title = websitetitles[1]+' - Created by Website Design Brighton';
});

	jQuery("#thumbnail3 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail3").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image3").fadeIn(1000); 
document.title = websitetitles[2]+' - Created by Website Design Brighton'; 
});

	jQuery("#thumbnail4 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail4").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image4").fadeIn(1000);
document.title = websitetitles[3]+' - Created by Website Design Brighton'; 
});

	jQuery("#thumbnail5 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail5").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image6, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image5").fadeIn(1000);
document.title = websitetitles[4]+' - Created by Website Design Brighton'; 
});

	jQuery("#thumbnail6 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail6").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image7, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image6").fadeIn(1000); 
document.title = websitetitles[5]+' - Created by Website Design Brighton';
});

	jQuery("#thumbnail7 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail7").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image8, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image7").fadeIn(1000);
document.title = websitetitles[6]+' - Created by Website Design Brighton'; 
});

	jQuery("#thumbnail8 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail8").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image9, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image8").fadeIn(1000); 
document.title = websitetitles[7]+' - Created by Website Design Brighton';
});

	jQuery("#thumbnail9 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail9").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image10").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image9").fadeIn(1000); 
document.title = websitetitles[8]+' - Created by Website Design Brighton'; 
});

	jQuery("#thumbnail10 a").history(function () {jQuery("#main-container").animate({width: "750px"});jQuery("#background-close").animate({left: "775px"});jQuery("#main-container-background").animate({width: "750px"});jQuery("#main-content-background").animate({width: "575px"});jQuery("#main-page-content").animate({width: "575px"});
	jQuery(nav).removeClass("selected").addClass("unselected"); jQuery("#our-latest-work-nav").removeClass("unselected").addClass("selected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});jQuery("#latest-sub-header").removeClass("sub-unselected").css({'color' : '#fff'});	jQuery("#about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(750);	jQuery("#latest-work-section").fadeIn(1000);
jQuery(thumbnails).removeClass("thumbnail-selected").addClass("thumbnail-unselected").stop().animate({opacity: 0.50}, 500); 
jQuery("#thumbnail10").removeClass("thumbnail-unselected").addClass("thumbnail-selected").stop().animate({opacity: 1}, 500);
jQuery("#large-image1, #large-image2, #large-image3, #large-image4, #large-image5, #large-image6, #large-image7, #large-image8, #large-image9").fadeOut(1000); 
jQuery("#wdb-large-logo").animate({opacity: 1}, 500);
jQuery("#large-image10").fadeIn(1000); 
document.title = websitetitles[9]+' - Created by Website Design Brighton';
});

// hover info boxes 

jQuery( ".large-image" ).each(function(intIndex){
jQuery( this ).bind ("mouseenter",function(){
jQuery('.image-info-bg, #image-info'+(intIndex+1)).stop().animate({left: 0+'px'}, 1000);
}).bind("mouseleave",function(){
jQuery('.image-info-bg, #image-info'+(intIndex+1)).stop().animate({left: -190+'px'}, 1000);
});  // .hover
});

 
// QUOTE  *********************************

jQuery(".quote-contact-link").bind("mouseenter",function(){
jQuery(".quote-call").fadeOut(500);jQuery(".quote-callback").fadeIn(500);
jQuery(".quote").css({background: '#ffffff'});
}).bind("mouseleave",function(){
jQuery(".quote-callback").fadeOut(500);jQuery(".quote-call").fadeIn(500);
jQuery(".quote").css({background: '#faeada'});
});  // .hover
 
 jQuery(".single-quote-contact-link").bind("mouseenter",function(){
jQuery(".single-quote").css({background: '#ffffff'});
}).bind("mouseleave",function(){
jQuery(".single-quote").css({background: '#faeada'});
});  // .hover

 jQuery(".brief-quote-contact-link").bind("mouseenter",function(){
jQuery(".brief-quote").css({background: '#ffffff'});
}).bind("mouseleave",function(){
jQuery(".brief-quote").css({background: '#faeada'});
});  // .hover

 jQuery("#site-in-brief").bind("mouseenter",function(){
jQuery("#site-in-brief").css({color: '#ffffff'});
}).bind("mouseleave",function(){
jQuery("#site-in-brief").css({color: '#faeada'});
});  // .hover

   jQuery("#site-in-brief").click(function(){
		jQuery("#brief-overlay").fadeIn(500);
		jQuery("#brief-overlay-box").fadeIn(1000);
});		

   jQuery(".call-back").click(function(){
		jQuery("#contact-overlay").fadeIn(500);
		jQuery("#contact-overlay-box").fadeIn(1000);
		jQuery("#call-back-sticker").fadeIn(1000);
});	
		
   jQuery("#contact-overlay, #call-back-close-btn, #brief-close-btn, #brief-overlay, .internal-link").click(function(){
   		jQuery("#brief-overlay").fadeOut(500);
		jQuery("#brief-overlay-box").fadeOut(500);
		jQuery("#contact-overlay").fadeOut(500);
		jQuery("#contact-overlay-box").fadeOut(500);
		jQuery("#call-back-sticker").fadeOut(500);		
});			
		
		    
   jQuery("#website-design-brighton-logo a, #close-btn a").history(function(){
jQuery("#main-container").animate({width: "175px"});jQuery("#main-container-background").animate({width: "175px"});	jQuery("#main-content-background").animate({width: "0px"});	jQuery("#main-page-content").animate({width: "0px"});	jQuery("#background-close").animate({left: "0px"});		jQuery("#close-btn").hide(0);jQuery("#latest-work-section, #about-us-section, #what-we-do-section, #how-we-work-section, #cost-section, #wdb-news-section, #contact-us-section").fadeOut(500);jQuery("#our-latest-work-nav, #about-us-nav, #what-we-do-nav, #how-we-work-nav, #cost-nav, #news-nav, #contact-us-nav").removeClass("selected");  jQuery("#our-latest-work-nav, #about-us-nav, #what-we-do-nav, #how-we-work-nav, #cost-nav, #news-nav, #contact-us-nav").addClass("unselected");jQuery(subheader).addClass("sub-unselected").css({'color' : '#999999'});		
});//.click



jQuery( ".portfolio-brighton-web-design-icon" ).each(function(intIndex){
jQuery( this ).bind ("mouseenter",function(){
jQuery(this).css({'color': '#ffffff','cursor': 'pointer',backgroundPosition: '0 -37px'});
jQuery('#portfolio-design-info-bg-'+(intIndex+1)).stop().animate({marginRight: 0+'px'}, 1000);
jQuery('#portfolio-design-info-content-'+(intIndex+1)).stop().animate({marginRight: 0+'px'}, 1000);
}).bind("mouseleave",function(){
jQuery(this).css({'color': '#faeada',backgroundPosition: '0 0'});
jQuery('#portfolio-design-info-bg-'+(intIndex+1)).stop().animate({marginRight: -190+'px'}, 1000);
jQuery('#portfolio-design-info-content-'+(intIndex+1)).stop().animate({marginRight: -190+'px'}, 1000);
});
});

jQuery( ".portfolio-brighton-website-design-icon" ).each(function(intIndex){
jQuery( this ).bind ("mouseenter",function(){
jQuery(this).css({'color': '#ffffff','cursor': 'pointer',backgroundPosition: '0 -1221px'});
jQuery('#portfolio-website-info-bg-'+(intIndex+1)).stop().animate({marginLeft: 0+'px'}, 1000);
jQuery('#portfolio-website-info-content-'+(intIndex+1)).stop().animate({marginLeft: 0+'px'}, 1000);
}).bind("mouseleave",function(){
jQuery(this).css({'color': '#faeada',backgroundPosition: '0 -1184px'});
jQuery('#portfolio-website-info-bg-'+(intIndex+1)).stop().animate({marginLeft: -190+'px'}, 1000);
jQuery('#portfolio-website-info-content-'+(intIndex+1)).stop().animate({marginLeft: -190+'px'}, 1000);
});
});

jQuery( ".portfolio-rollover-container" ).each(function(intIndex){
jQuery( this ).hover(function(){ 
jQuery('#portfolio-design-info-bg-'+(intIndex+1)).stop().animate({marginRight: 0+'px'}, 1000);jQuery('#portfolio-website-info-bg-'+(intIndex+1)).stop().animate({marginLeft: 0+'px'}, 1000);jQuery('#portfolio-design-info-content-'+(intIndex+1)).stop().animate({marginRight: 0+'px'}, 1000);jQuery('#portfolio-website-info-content-'+(intIndex+1)).stop().animate({marginLeft: 0+'px'}, 1000);
},function(){ 
jQuery('#portfolio-design-info-bg-'+(intIndex+1)).stop().animate({marginRight: -190+'px'}, 1000);jQuery('#portfolio-website-info-bg-'+(intIndex+1)).stop().animate({marginLeft: -190+'px'}, 1000);
jQuery('#portfolio-design-info-content-'+(intIndex+1)).stop().animate({marginRight: -190+'px'}, 1000);jQuery('#portfolio-website-info-content-'+(intIndex+1)).stop().animate({marginLeft: -190+'px'}, 1000);
 }); // .hover
 });
 
 jQuery(".btn").hover(function(){ 
jQuery(this).css({backgroundPosition : '0 -168px', 'cursor': 'hand'});
},function(){ 
jQuery(this).css({backgroundPosition : '0 -144px'});
 }); //  .hover
 
  jQuery('input[type=text], textarea').each(function() { jQuery(this).focus(function() {  if(jQuery(this).val() == this.defaultValue)    jQuery(this).val("");  });  jQuery(this).blur(function() {    if(jQuery(this).val() == "")      jQuery(this).val(this.defaultValue);  });});
 
jQuery("#form-name, #form-email, #message-area").hover(function(){ 
jQuery(this).css({borderColor : '#FF8302', color : '#000000'});
},function(){ 
jQuery(this).css({borderColor : '#505050', color : '#222222'});
 }); //  .hover
 
}); // doc.ready close