<!--coda silder-->

$().ready(function() {
	$('.coda-slider').codaSlider();
});


<!--end of header-container-->

$(document).ready(function() {

	$("a.lightbox").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade'	
			
		});
			
	});


<!--image black and white to colour-->


$(document).ready(function(){

	$("img.a").hover(
	function() {
	$(this).stop().animate({"opacity": "0"}, 1500);
	},
	function() {
	$(this).stop().animate({"opacity": "1"}, 1500);
	
	});
 
});

$(document).ready(function(){

	$("img[rel=tweet].a").hover(
	function() {
	$(this).stop().animate({"opacity": "0"}, 300);
	},
	function() {
	$(this).stop().animate({"opacity": "1"}, 1500);
	
	});
 
});

<!--tooltip for project selection-->

$(function() {
	$('a[rel=tipsy]').tipsy({fade: true, gravity: 's'});
});


$(function() {
	$('img[alt=tweet]').tipsy({fade: true, gravity: 'w'});
});


$(document).ready(function(){
 		$("#ajax-contact-form").submit(function(){
 
 		var str = $(this).serialize();
 
		    $.ajax({
		    type: "POST",
		    url: "contact.php",
		    data: str,
		    success: function(msg){
     
 		$("#note").ajaxComplete(function(event, request, settings){
 
			 if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
			 {
			 result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
			 $("#fields").hide();
			 }
			 else
			 {
			 result = msg;
			 }
 
 		$(this).html(result);
 
 	});
 
 		}
 
 	});
 
 		return false;
 
	});
});

$(document).ready(function(){

 	$("#openBtn").click(function(){
 	
 		if ($("#callBack").is(":hidden")){
 			$("#callBack").slideDown({
 				duration: 850, 
 				easing: 'easeOutBack'});
		}
		
 		else{
 		
 		$("#callBack").slideUp({
 			duration: 250, 
 			easing: 'swing'});
 		}
 	}); 

 }); 

$(document).ready(function() { 
    $('#blog_feed').gFeed({  
        url: 'http://www.randpdesign.co.uk/blog/?feed=rss2', 
        max: 2
    });     
}); 

$(document).ready(function() { 
    $('#blog_comments').gFeed({  
        url: 'http://www.randpdesign.co.uk/blog/comments/feed/?feed=rss2', 
        max: 4
    });     
}); 

