

$(document).ready(function(){

//Contact starts here	
	$(function(){
		$('#contactAt').contactable({
	 		recipient: 'david@bluebox-sales.com',
	 		subject: 'The Quick Message'
	 	});
	});

//Twit start here
		twitShowStatus = 1;
		function twitShow() {
				$('div#twitable').animate({"marginLeft": "-=5px"}, "fast"); 
				$('#twitform').animate({"marginLeft": "-=0px"}, "fast");
				$('div#twitable').animate({"marginLeft": "+=600px"}, "slow"); 
				$('#twitform').animate({"marginLeft": "+=600px"}, "slow");
				$('.twitContainer .close').css({right: '-4px'});
				twitShowStatus = 0;
			}
		function twitHide() {
				$('#twitform').animate({"marginLeft": "-=600px"}, "slow");
				$('div#twitable').animate({"marginLeft": "-=600px"}, "slow").animate({"marginLeft": "+=5px"}, "fast"); 
				$('.twitContainer .close').css({right: '0px'});
				twitShowStatus =1;
			}
		
			$('div#twitable').click(
				function() {
				if(twitShowStatus==1)
				{
					twitShow();
				}
				else
				{
					twitHide();
				}
			
			});
		username = '8Ddesign';// twitter User name
		$('#twitform').twit(username);
		$('#twitform').twit(username, {
		limit: 5,
		label: 'Twitter',
		title: 'My tweets'
		});
//Twitter ends here	

 //Page Flip on hover
	$("#pageflip").hover(function() {
		$("#pageflip img , .msg_block").stop()
			.animate({
				width: '303px', 
				height: '315px'
			}, 500); 
		} , function() {
		$("#pageflip img").stop() 
			.animate({
				width: '50px', 
				height: '52px'
			}, 220);
		$(".msg_block").stop() 
			.animate({
				width: '50px', 
				height: '50px'
			}, 200);
	});

 	$('.dumbCrossFade .dumbItem').dumbCrossFade({'slideType':'slidevertical','fadeInOut':true});
	
});	

// -----------------------------------------------------------------------------------------
// SUBMIT A FORM
// hidden act = $action
// f = formname in quotes
// v = validation function no quotes (optional)
// hidden data = $v (optional)
// m = confirm message (optional)
// p = submit to page (optional)

function submitForm($action,f,v,$v,m,p) {
	if(m) {if(!confirm(m)) return;}
	$f = document.forms[f];
	if(v){if(!v($f)) return;}
	if($v)$f.data.value = $v;
	if(p)$f.action = p;
	$f.act.value = $action;
	$f.submit();
}

// -----------------------------------------------------------------------------------------


