$(document).ready(function(){

$("span#bookmark-tile").css({height: "110px"});
$("span#bookmark-tile img").css({opacity: 1.0});

$("a.testimonial").click(
	function(){
		$("div.default-information").fadeOut();
		$("div.testimonial-tile").pause(700).fadeIn();
		$(this).fadeOut();
		$("a.maininfo").pause(700).fadeIn();
	}
);
$("a.maininfo").click(
	function(){
		$("div.testimonial-tile").fadeOut();
		$("div.default-information").pause(700).fadeIn();
		$(this).fadeOut();
		$("a.testimonial").pause(700).fadeIn();
	}
);

$("a.showdetails").click(
	function(){
		$("div#optionalquote").toggle('fade');
	}
);

var more = $("div#main-box-content");

$("#readmore").click(function(){
	$("div#main-box-content:not(.closed)").not('opened').addClass('opened').hide('fast', function() {
		$("div#main-box-content").css({
			'overflow' : 'auto', 
			'height' : 'auto', 
			'line-height' : '1.2em', 
			'display' : 'block',
			'padding-top' : '30px'
		}).show('fade');
		$("more-about-website-uk").css('padding-right', '15px');
	});
	$("div#main-box-content.closed").removeClass('closed').addClass('opened').show('slow');
});
$(".close-approach").click(function(){
	$("div#main-box-content.opened").removeClass('opened').addClass('closed').hide('slow');
});


$("a.make-appear").click(function(){$("#even-more").toggle('fade');});

$("a.show-more").click(
	function(){
			var href = "";
			href = "#" + $(this).attr("rel") + ".icon-info";
			//$(".icon-info").hide('fade');
			$(href).toggle('fade');
			return false;
			}
);
$("a.close-more").click(
	function(){
			var href = "";
			href = "#" + $(this).attr("rel") + "";
			$(href).hide('fade');
			return false;
			}
);
$("a#home-main-close-more").click(
	function(){
			var href = "";
			href = "#" + $(this).attr("rel") + "";
			$(href).hide('fade');
			$("a.readmore").css({'display' : 'inline'});
			}
);

/*
$("a.more-colorbox").click(
	function(){
			var href = "";
			href = $(this).attr("href");
			$(".more-colorbox").colorbox({width:"1000px", inline:true, href:href});
			}
);

$("a.more-colorbox-small").click(
	function(){
			var href = "";
			href = $(this).attr("href");
			$(".more-colorbox-small").colorbox({width:"380px", inline:true, href:href});
			}
);
*/
});


// bookmark sites link for IE, plus messages in firefox and opera
// href="javascript:bookmarksite('company','http://www.domain.co.uk')"

function bookmarksite(title,url){
	if (document.all)
	window.external.AddFavorite(url,title);
	else if (window.sidebar)
		  alert('This feature only works for Internet Explorer, use Control+D to bookmark This website');
	else if( window.opera && window.print )
		alert('This feature only works for Internet Explorer, use Control+T to bookmark This website');
}