$(document).ready(function() {
	$("#twitter").getTwitter({
		userName: "sarniayachts",
		numTweets: 1,
		loaderText: "Loading tweets...",
		slideIn: false,
		slideDuration: 1700,
		showHeading: true,
		headingText: "",
		showProfileLink: false,
		showTimestamp: true
	});
});

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

$(document).ready(function() {
  
  function addMega(){
	$(this).addClass("hovering");
	}

  function removeMega(){
	$(this).removeClass("hovering");
	}

var megaConfig = {
	 interval: 0,
	 sensitivity: 4,
	 over: addMega,
	 timeout: 200,
	 out: removeMega
};

$("li.mega").hoverIntent(megaConfig)

  
});



$(document).ready(function() {	
						   
    $('a[name=modal]').click(function(e) {
        //Cancel the link behavior
        e.preventDefault();
        //Get the A tag
        var id = $(this).attr('href');
     
     

     
        //Get the window height and width
        var winH = $(window).height();
        var winW = $(window).width();
               
        //Set the popup window to center
        $(id).css('top',  winH/2-$(id).height()/2);
        $(id).css('left', winW/2-$(id).width()/2);
     
        //transition effect
        $(id).fadeIn(500);
     
    });
     
    //if close button is clicked
    $('.cbwindow .close').click(function (e) {
        //Cancel the link behavior
        e.preventDefault();
        $('.cbwindow').hide();
    });    
     
 
	
	});
