/* Author: Richard Delph

*/

jQuery(function($){
	$.supersized({
		min_width : 1120,
		min_height : 700,
		vertical_center : 0,
		horizontal_center : 1,
		fit_portrait : 1,
		fit_landscape : 0,
		slides : [ {image: 'images/background.jpg'}]
	});
	
	$('#social-cta').hover(function() {
		$(this).animate({height: 40});
	}, function() {
		$(this).animate({height: 5});
	});
	
	$('input[type=text]').focus(function() {
		if ( $(this).val() == $(this).attr('title') )
			$(this).val('').removeClass('placeholder');
	}).blur(function() {
		if ( $.trim($(this).val()) == '' ) 
			$(this).val($(this).attr('title')).addClass('placeholder');
			
	});
});


/* Twitter, FB & Plusone Code */

!function(d,s,id) {
	var js,fjs=d.getElementsByTagName(s)[0];
	if(!d.getElementById(id)){
		js=d.createElement(s);
		js.id=id;js.src="//platform.twitter.com/widgets.js";
		fjs.parentNode.insertBefore(js,fjs);
	}
}(document,"script","twitter-wjs");

window.___gcfg = {lang: 'en-GB'};
(function() {
	var po = document.createElement('script');
	po.type = 'text/javascript';
	po.async = true;
	po.src = 'https://apis.google.com/js/plusone.js';
	var s = document.getElementsByTagName('script')[0];
	s.parentNode.insertBefore(po, s);
})();

(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) return; 
	js = d.createElement(s); 
	js.id = id; 
	js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; 
	fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

