 /* =========================================================
// jquery.innerFade.js

// Date: 2010-07-23
// Author: Wes Baker
// Mail: wes@wesbaker.com	
// Web: http://www.wesbaker.com
// ========================================================= */

(function($) {
	var default_options = {
		'animationType':			'fade',
		'animate': 					true,
		'first_slide': 				0,
		'easing':					'linear',
		'speed':					'normal',
		'type':						'sequence',
		'timeout':					2000,
		'startDelay': 				0,
		'loop': 					true,
		'containerHeight':			'auto',
		'runningClass':				'innerFade',
		'children':					null,
		'cancelLink':				null, 
		'pauseLink':				null,
		'prevLink':					null,
		'nextLink':					null,
		'indexContainer': 			null,
		'currentItemContainer': 	null,
		'totalItemsContainer': 		null,
		'callback_index_update': 	null
	};
	
	$.fn.innerFade = function(options) {
		return this.each(function() {
			$fade_object = new Object();
			// Assign the container
			$fade_object.container = this;
			// Combine default and set settings or use default
			// Pay attention kids, there's an important lesson here. When using $.extend, the first parameter will
			// be CHANGED to the combination of all the parameters. In my situation, I just wanted to combine two 
			// objects, but not affect them in any way hence the empty object.
			$fade_object.settings = $.extend({}, default_options, options);
			// If children option is set use that as elements, otherwise use the called jQuery object
			$fade_object.elements = ($fade_object.settings.children === null) ? $($fade_object.container).children() : $($fade_object.container).children($fade_object.settings.children);
			// Setup the count
			$fade_object.count = 0;
			// Save data to container for use later
			$($fade_object.container).data('object', $fade_object);
			
			// Start the loop
			if ($fade_object.elements.length > 1) {
				// Establish the Next and Previous Handlers
				$.bindControls($fade_object);

				// Establish Cancel Handler
				if ($fade_object.settings.cancelLink) { $.bindCancel($fade_object); };

				// Set outer container as relative, and use the height that's set and add the running class
				$($fade_object.container).css({'position': 'relative'}).addClass($fade_object.settings.runningClass);
				if ($fade_object.settings.containerHeight == 'auto') {
					height = $($fade_object.elements).filter(':first').height();
					$($fade_object.container).css({'height': height + 'px'});
				} else {
					$($fade_object.container).css({'height': $fade_object.settings.containerHeight});
				};

				// Build the Index if one is specified
				if ($fade_object.settings.indexContainer) {				
					$.innerFadeIndex($fade_object);
				};

				$($fade_object.elements).filter(':gt(0)').hide(0);
				// Set the z-index from highest to lowest (20, 19, 18...) and set their position as absolute
				for (var i = 0; i < $fade_object.elements.length; i++) {
					$($fade_object.elements[i]).css('z-index', String($fade_object.elements.length-i)).css('position', 'absolute');
				}

				var toShow = '';
				var toHide = '';

				if ($fade_object.settings.type == "random") {
					toHide = Math.floor(Math.random() * $fade_object.elements.length);
					do { 
						toShow = Math.floor(Math.random() * $fade_object.elements.length);
					} while (toHide == toShow );				
					$($fade_object.elements[toHide]).show();
				} else if ( $fade_object.settings.type == 'random_start' ) {
					$fade_object.settings.type = 'sequence';
					toHide = Math.floor ( Math.random () * ( $fade_object.elements.length ) );
					toShow = (toHide + 1) % $fade_object.elements.length;
				} else {
					// Otherwise and if its sequence
					toShow = $fade_object.settings.first_slide;
					toHide = ($fade_object.settings.first_slide == 0) ? $fade_object.elements.length - 1 : $fade_object.settings.first_slide - 1;
				}

				if ($fade_object.settings.animate) {
					$.fadeTimeout($fade_object, toShow, toHide, true);
				} else {
					$($fade_object.elements[toShow]).show();
					$($fade_object.elements[toHide]).hide();
					$.updateIndexes($fade_object, toShow);
				};
				$.updateIndexes($fade_object, toShow);

				if ($fade_object.settings.type == 'random') {
					$($fade_object.elements[toHide]).show();
				} else {
					$($fade_object.elements[toShow]).show();
				};

				// Set item count containers
				if ($fade_object.settings.currentItemContainer) { $.currentItem($fade_object, toShow); };
				if ($fade_object.settings.totalItemsContainer) { $.totalItems($fade_object); };

				// Establish the Pause Handler
				if ($fade_object.settings.pauseLink) {
					$.bind_pause($fade_object);
				};
			}
		});
	};
	
	/**
	 * Public function to change to a specific slide. This is expecting a zero-index slide number.
	 * @param {Number} slide_number Zero-indexed slide number
	 */
	$.fn.innerFadeTo = function(slide_number) {
		return this.each(function(index) {
			var $fade_object = $(this).data('object');
			
			var $currentVisibleItem = $($fade_object.elements).filter(':visible');
			var currentItemIndex = $($fade_object.elements).index($currentVisibleItem);
			$.stopSlideshow($fade_object);
			if (slide_number != currentItemIndex) {
				$.fadeToItem($fade_object, slide_number, currentItemIndex);
			};
		});
	};

	/**
	 * Fades the slideshow to the item selected from the previous item
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 * @param {Number} toShow The position in the elements array of the item to be shown
	 * @param {Number} toHide The position in the elements array of the item to be hidden
	 */
	$.fadeToItem = function($fade_object, toShow, toHide) {		
		// Update the next and previous controls
		var buildControls = function() {
			if ($fade_object.settings.nextLink || $fade_object.settings.prevLink) { $.bindControls($fade_object); }
		};
		
		if ($fade_object.settings.animationType == 'slide') {
			$($fade_object.elements[toHide]).slideUp($fade_object.settings.speed);
			$($fade_object.elements[toShow]).slideDown($fade_object.settings.speed, function() {buildControls();});
		} else if ($fade_object.settings.animationType == 'slideOver') {
			var itemWidth = $($fade_object.elements[0]).width(),
				to_hide_css = {},
				to_show_css = {},
				to_hide_animation = {},
				to_show_animation = {};
				
			$($fade_object.container).css({'overflow': 'hidden'});
			
			// Both CSS Declarations use the same initial CSS
			to_hide_css = {
				'position': 'absolute',
				'top': '0px'
			};
			
			to_show_css = $.extend({}, to_hide_css);
			
			// If going forward, we want the item (to be shown) to animate from the right to left
			// If going backwards, we want the item (to be shown) to animate from the left to the right
			if (toShow > toHide) { // Forwards
				console.log('Forwards!');
				to_hide_css.left = "0px";
				to_hide_css.right = "auto";

				to_show_css.left = 'auto';
				to_show_css.right = '-' + itemWidth + 'px';

				to_hide_animation.left = '-' + itemWidth + 'px';

				to_show_animation.right = '0px';
				
				console.log(to_hide_css);
			} else { // Backwards
				console.log("Backwards!");
				to_hide_css.left = "auto";
				to_hide_css.right = "0px";

				to_show_css.left = '-' + itemWidth + 'px';
				to_show_css.right = 'auto';

				to_hide_animation.right = '-' + itemWidth + 'px';

				to_show_animation.left = '0px';
			};
			
			$($fade_object.elements[toHide]).css(to_hide_css);
			$($fade_object.elements[toShow]).css(to_show_css).show();

			$($fade_object.elements[toHide]).animate(to_hide_animation, $fade_object.settings.speed, $fade_object.settings.easing, function() {
				$(this).hide();
			});
			
			$($fade_object.elements[toShow]).animate(to_show_animation ,$fade_object.settings.speed, $fade_object.settings.easing, function() {
				buildControls();
			});
		} else {
			$($fade_object.elements[toHide]).fadeOut($fade_object.settings.speed);
			$($fade_object.elements[toShow]).fadeIn($fade_object.settings.speed, function() {
				buildControls();
			});
		}
		// Update the toShow item
		if ($fade_object.settings.currentItemContainer) {
			$.currentItem($fade_object, toShow);
		};
		
		// Update indexes with active classes
		if ($fade_object.settings.indexContainer || $fade_object.settings.callback_index_update) {
			$.updateIndexes($fade_object, toShow);
		};
	};

	/**
	 * Fades to the item of your choosing and establishes the timeout for the next item to fade to
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 * @param {Number} toShow The position in the elements array of the item to be shown
	 * @param {Number} toHide The position in the elements array of the item to be hidden
	 * @param {Boolean} firstRun If this is the first run of innerfade, pass true, otherwise pass false
	 */
	$.fadeTimeout = function($fade_object, toShow, toHide, firstRun) {
		// If its not the first run, then fade
		if (firstRun != true) {
			$.fadeToItem($fade_object, toShow, toHide);
		};
		
		// Increment the count of slides shown
		$fade_object.count++;
		
		// Check if loop is false, if it is check to see how many slides have been shown.
		// In the case that you're at the last slide, stop the slideshow and return.
		if ($fade_object.settings.loop == false && $fade_object.count >= $fade_object.elements.length) {
			$.stopSlideshow($fade_object);
			return;
		};

		// Get ready for next fade
		if ($fade_object.settings.type == "random") {
			toHide = toShow;
			while (toShow == toHide) { toShow = Math.floor(Math.random() * $fade_object.elements.length); }
		} else {
			toHide = (toHide > toShow) ? 0 : toShow;
			toShow = (toShow + 1 >= $fade_object.elements.length) ? 0 : toShow + 1;
		}
		
		// Set the time out; if its first run and a start delay exists, use the start delay
		var timeout = (firstRun && $fade_object.settings.startDelay) ? $fade_object.settings.startDelay : $fade_object.settings.timeout;
		$($fade_object.container).data('current_timeout', setTimeout((function() { $.fadeTimeout($fade_object, toShow, toHide, false); }), timeout));
	};

	/* Allows the unbind function to be called from javascript */
	$.fn.innerFadeUnbind = function() {
		return this.each(function(index) {
			var $fade_object = $(this).data('object');
			$.stopSlideshow($fade_object);
		});
	};
	
	/**
	 * Stops the slideshow
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.stopSlideshow = function($fade_object) {
		clearTimeout($($fade_object.container).data('current_timeout'));
		$($fade_object.container).data('current_timeout', null);
	};
	
	/**
	 * Establishes the Next and Previous link behavior
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.bindControls = function($fade_object) {
		$($fade_object.settings.nextLink).unbind().one('click', function(event) {
			event.preventDefault();
			$.stopSlideshow($fade_object);
			
			var $currentElement = $($fade_object.elements).filter(':visible');
			var currentElementIndex = $($fade_object.elements).index($currentElement);

			var $nextElement = ($currentElement.next().length > 0) ? $currentElement.next() : $($fade_object.elements).filter(':first');
			var nextElementIndex = $($fade_object.elements).index($nextElement);
			
			$.fadeToItem($fade_object, nextElementIndex, currentElementIndex);
		});
			
		$($fade_object.settings.prevLink).unbind().one('click', function(event) {
			event.preventDefault();
			$.stopSlideshow($fade_object);
			
			var $currentElement = $($fade_object.elements).filter(':visible');
			var currentElementIndex = $($fade_object.elements).index($currentElement);

			var $previousElement = ($currentElement.prev().length > 0) ? $currentElement.prev() : $($fade_object.elements).filter(':last');
			var previousElementIndex = $($fade_object.elements).index($previousElement);
			
			$.fadeToItem($fade_object, previousElementIndex, currentElementIndex);
		});
	};
	
	/**
	 * Establishes the Pause Button
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.bind_pause = function($fade_object) {		
		$($fade_object.settings.pauseLink).unbind().click(function(event) {
			event.preventDefault(); 
			if ($($fade_object.container).data('current_timeout') != null) {
				$.stopSlideshow($fade_object);
			} else {
				// Restart the slideshow				
				var tag = $($fade_object.container).children(':first').attr('tagName').toLowerCase();
				var nextItem = '';
				var previousItem = '';
				
				if ($fade_object.settings.type == "random") {
					previousItem = Math.floor(Math.random() * $fade_object.elements.length);
					do { 
						nextItem = Math.floor(Math.random() * $fade_object.elements.length);
					} while (previousItem == nextItem);
				} else if ($fade_object.settings.type == "random_start") {
					previousItem = Math.floor(Math.random() * $fade_object.elements.length);
					nextItem = (previousItem + 1) % $fade_object.elements.length;
				} else {
					previousItem = $(tag, $($fade_object.container)).index($(tag+':visible', $($fade_object.container)));
					nextItem = ((previousItem + 1) == $fade_object.elements.length) ? 0 : previousItem + 1;
				}
				
				$.fadeTimeout($fade_object, nextItem, previousItem, false);
			}
		});
	};
		
	/**
	 * Establishes the Cancel Button
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.bindCancel = function($fade_object) {
		$($fade_object.settings.cancelLink).unbind().click(function(event) {
			event.preventDefault();
			$.stopSlideshow($fade_object);
		});
	};

	/**
	 * Updates the indexes and adds an active class to the visible item
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 * @param {Number} toShow The position in the elements array of the item to be shown
	 */
	$.updateIndexes = function($fade_object, toShow) {
		$($fade_object.settings.indexContainer).children().removeClass('active');
		$('> :eq(' + toShow + ')', $($fade_object.settings.indexContainer)).addClass('active');
		
		// Check for the callback index update
		if (typeof($fade_object.settings.callback_index_update) == "function") {
			$fade_object.settings.callback_index_update.call(this, toShow);
		};
	};
	
	/**
	 * Creates handlers for the links created by the $.handleIndexes and $.generateIndexes functions
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 * @param {Number} count The item to be setting the link on
	 * @param {jQuery Object} link The selector or jQuery object of the link
	 */
	$.createIndexHandler = function($fade_object, count, link) {
		$(link).click(function(event) {
			event.preventDefault();
			var $currentVisibleItem = $($fade_object.elements).filter(':visible');
			var currentItemIndex = $($fade_object.elements).index($currentVisibleItem);
			$.stopSlideshow($fade_object);
			if ($currentVisibleItem.size() <= 1 && count != currentItemIndex) {
				$.fadeToItem($fade_object, count, currentItemIndex);
			};
		});
	};
	
	/**
	 * Creates one link for each item in the slideshow, to show that item immediately
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.createIndexes = function($fade_object) {
		var $indexContainer = $($fade_object.settings.indexContainer);
		
		for (var i=0; i < $fade_object.elements.length; i++) {
			var	$link = $('<li><a href="#">' + (i + 1) + '</a></li>');
			$.createIndexHandler($fade_object, i, $link);
			$indexContainer.append($link);
		};
	};
	
	/**
	 * Establishes links between the slide elements and index items in the indexContainer
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.linkIndexes = function($fade_object) {
		var $indexContainer = $($fade_object.settings.indexContainer);
		var $indexContainerChildren = $('> :visible', $indexContainer);
		
		if ($indexContainerChildren.size() == $fade_object.elements.length) {
			var count = $fade_object.elements.length;
			for (var i=0; i < count; i++) {
				$('a', $indexContainer).click(function(event) {event.preventDefault();});
				$.createIndexHandler($fade_object, i, $indexContainerChildren[i]);
			};
		} else {
			alert("There is a different number of items in the menu and slides. There needs to be the same number in both.\nThere are " + $indexContainerChildren.size() + " in the indexContainer.\nThere are " + $fade_object.elements.length + " in the slides container.");
		};		
	};
	
	/**
	 * Determines if the index container is empty or not. If its empty then it generates links, if its not empty 
	 * it links one to one
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.innerFadeIndex = function($fade_object) {
		var $indexContainer = $($fade_object.settings.indexContainer);
		if ($(':visible', $indexContainer).size() <= 0) {
			$.createIndexes($fade_object);
		} else {
			$.linkIndexes($fade_object);
		};
	};
	
	/**
	 * Changes the text of the current item selector to the index of the current item
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 * @param {Number} current Index of the current slide
	 */
	$.currentItem = function($fade_object, current) {
		var $container = $($fade_object.settings.currentItemContainer);
		$container.text(current + 1);
	};
	
	/**
	 * Changes the text of the total item selector to the total number of items
	 * @param {Object} $fade_object The object that contains the settings, elements and container for this slideshow
	 */
	$.totalItems = function($fade_object) {
		var $container = $($fade_object.settings.totalItemsContainer);
		$container.text($fade_object.elements.length);
	};
})(jQuery);

if(top!=self){top.location.replace(document.location);alert("For security reasons, framing is not allowed; click OK to remove the frames.")}(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(c){c.each(["backgroundColor"],function(e,d){c.fx.step[d]=function(f){if(!f.colorInit){f.start=b(f.elem,d);f.end=a(f.end);f.colorInit=true}f.elem.style[d]="rgb("+[Math.max(Math.min(parseInt((f.pos*(f.end[0]-f.start[0]))+f.start[0]),255),0),Math.max(Math.min(parseInt((f.pos*(f.end[1]-f.start[1]))+f.start[1]),255),0),Math.max(Math.min(parseInt((f.pos*(f.end[2]-f.start[2]))+f.start[2]),255),0)].join(",")+")"}});function a(e){var d;if(e&&e.constructor==Array&&e.length==3){return e}if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e)){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e)){return[parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55]}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e)){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e)){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}if(d=/rgba\(0, 0, 0, 0\)/.exec(e)){return[255,255,255]}return[255,255,255]}function b(f,d){var e;do{e=c.curCSS(f,d);if(e!=""&&e!="transparent"||c.nodeName(f,"body")){break}d="backgroundColor"}while(f=f.parentNode);return a(e)}})(jQuery);(function(a){a.fn.defaultval=function(c){var b=this;return(b.each(function(){var d=a(this);if(d.val()==""){d.val(c).css("color","#999")}d.focus(function(){if(d.val()==c){d.val("").css("color","#111")}}).blur(function(){if(d.val()==""){d.val(c).css("color","#999")}})}))}})(jQuery);jQuery.fn.protectImage=function(a){return this.each(function(){var e=$(this);var c=e.position();var b=e.height();var d=e.width();var g=$('<img width="'+d+'" height="'+b+'" src="/images/Copyright-Handy-Hippo-Ltd-s.gif" alt="" />').css({position:"absolute",top:c.top,left:c.left,zIndex:20});f(e,g,"tipup");f(e,g,"tipdown");g.appendTo(e.parent());function f(i,j,h){if(i.hasClass(h)){j.addClass(h).attr("title",i.attr("title"));i.removeClass(h).removeAttr("title")}}})};(function(a){a.fn.hhTip=function(d){var g={edgeOffset:7,defaultPosition:"top",delay:400,fadeIn:100,fadeOut:100,width:0};var e=a.extend(g,d);if(a("#hhtip").length<=0){a("body").append('<div id="hhtip"><div id="hhtip-arrow"></div><div id="hhtip-content"></div></div>')}var b=a("#hhtip");var f=a("#hhtip-content");var c=a("#hhtip-arrow");var h=b.css("max-width");return this.each(function(){var m=a(this);var n=m.attr("title");var k=m.attr("id");if(a("#"+k+"-tip").length==1){n=a("#"+k+"-tip").html()}if(n!=""){m.removeAttr("title");var l=false;m.hover(function(){i()},function(){j()});function i(){b.hide();f.html(n);if(e.width>0){b.css("max-width",e.width+"px")}else{b.css("max-width",h)}var v=parseInt(m.offset()["top"]);var p=parseInt(m.offset()["left"]);var t=parseInt(m.outerWidth());var w=parseInt(m.outerHeight());var u=b.outerWidth();var q=b.outerHeight();var s=Math.round(p+((t-u)/2));var r=Math.round((u/2)-9);if(e.defaultPosition=="bottom"){var o=Math.round(v+w+e.edgeOffset);c.removeClass("hhtip-arrow-down").addClass("hhtip-arrow-up")}else{var o=Math.round(v-q-e.edgeOffset);c.removeClass("hhtip-arrow-up").addClass("hhtip-arrow-down")}c.css("left",r+"px");b.css({top:o+"px",left:s+"px"});if(l){clearTimeout(l)}l=setTimeout(function(){b.stop(true,true).fadeIn(e.fadeIn)},e.delay)}function j(){if(l){clearTimeout(l)}b.fadeOut(e.fadeOut)}}})}})(jQuery);function ScrollForMore(){var a=$("#scroll-for-more");if(a.length!=1){return}if(a.css("position")=="absolute"){return}if($(document).width()<1300){a.hide();return}$(window).scroll(function(){var b=1.3-(jQuery(window).scrollTop()/400);if(b>1){b=1}if(b<=0){b=0;a.unbind().css("cursor","auto");$(window).unbind("scroll")}a.clearQueue().fadeTo(200,b)});a.click(function(){var b=$(window).scrollTop()+400+"px";$("html,body").animate({scrollTop:b},300)})}$(window).bind("load",function(){$("img.protect").protectImage();$(".tipup").hhTip({defaultPosition:"top"});$(".tipdown").hhTip({defaultPosition:"bottom"});$(".tipwide").hhTip({defaultPosition:"top",width:500});var a=$("#facebook_target");if(a.length>0){var b=a.width();var c="";c+='<iframe src="http://www.facebook.com/plugins/like.php?href='+escape(document.URL)+"&amp;layout=standard&amp;show_faces=false";c+="&amp;width="+b+'&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" ';c+='style="border:none; overflow:hidden; width:'+b+'px; height:35px;" allowTransparency="true" ></iframe>';a.html(c)}});function activateSubMenu(f){var d=f.parent();d.children().removeClass("nav-hovering");$(".nav-leaflist").hide();$(".nav-info").hide();var b=f.addClass("nav-hovering").attr("id");var a="#"+b+"-leaf";var c="#"+b+"-info";$(a).show();$(c).show()}function showNav(){var b=$(this);var c=b.offset();var a=b.height();var d=b.attr("id");$(".nav-l1").removeClass("nav-active");$(".nav-popup").css({left:"-9999px"});activateSubMenu(b.find(".nav-cat:first"));b.addClass("nav-active");$("#"+d+"-content").css({top: 148+'px', left: '10px'})}function hideNav(){var a=$(this);var b=a.attr("id");a.removeClass("nav-active");$("#"+b+"-content").css({left:"-9999px"})}function showSub(){var a=$(this);activateSubMenu(a)}$(document).ready(function(){if(!$("#nav").hasClass("checkout-nav")){$.get("/menu/topmenufull.php?t=38",function(d){$("#nav").html(d);var b={interval:50,sensitivity:10,timeout:200,over:showNav,out:hideNav};$(".nav-l1:not(.nav-search)").hoverIntent(b);var c={interval:50,sensitivity:10,timeout:200,over:showSub,out:function(){}};$(".nav-cat").hoverIntent(c)})}$(".ajaxremap").submit(function(){var c=$(this);var b=c.find("input[name='prod']").val();var d=c.find("input[name='qty']").val();c.find(".sec-addcart").attr("disabled","disabled").text("Updating...").after('<img class="ajax-loader" src="/images/v4/ajax-loader.gif" alt="" />');$.ajax({url:"/cart/add/"+b+"/"+d,dataType:"json",success:addBasketHandler,error:ajaxFail,timeout:8000});return false});$(".search_sort").change(function(){$(this).closest("form").submit()});var a={interval:50,sensitivity:5,timeout:300,over:function(){$("#tb-inner").clearQueue().slideDown()},out:function(){$("#tb-inner").clearQueue().slideUp()}};$(".shoppingbag").hoverIntent(a);ScrollForMore();$(".focus-on-me").focus()});var productAddedQueue=[];var animating=false;function AnimateQueuedProduct(){if(productAddedQueue.length==0){animating=false;return}var e=productAddedQueue.shift();animating=true;$(".tb-added-count").text(e.qty);$("#tb-added-name").html(e.name);$("#tb-added-img").attr("src",e.img);$("#tb-justadded").delay(200).slideDown(200)}function addBasketHandler(b,c){$("#tb-summary").html(b.top);$("#tb-itemcount").text(b.itemcount);$("#tb-total").text(b.total);$(".ajax-loader").remove();$(".sec-buyboth").removeAttr("disabled").text("Add Both Now");for(var a=0;a<b.items.length;a++){$("#p-edit-"+b.items[a].id).text(""+b.items[a].qty+" in Basket - Edit").show();$("#add-"+b.items[a].id).find(".sec-addcart").removeAttr("disabled").text("Add Another")}productAddedQueue=productAddedQueue.concat(b.items);if(!animating){AnimateQueuedProduct()}}function ajaxFail(a,c,b){$(".sec-addcart").each(function(){var d=$(this);if(d.text()=="Updating..."){d.text("Add to Basket")}});$(".sec-addcart[disabled='disabled']").text("Add to Basket");$(".sec-addcart").removeAttr("disabled");$(".ajax-loader").remove();$(".ajaxremap").unbind("submit")};


