$(document).ready(function() {

// ceebox

$(".ceebox").ceebox();
$(".ceebox a").hover(function(){
	$(this).addClass("huba").append('<div class="show png"></div>');
  $(".huba .show").show();
},function(){
  $(".huba .show").hide()
  $(this).removeClass("huba");
});

// form

$('.inp_txt').example(function() {
		return $(this).attr('title');
	},
	{ 
		hide_label: true
	});

// slider

	$('#loopedSlider').loopedSlider({
		autoStart: 8000,
		restart: 8000,
		containerClick: true,
		slidespeed: 1500
	});

//countdown
	
	var liftoffTime = new Date(2010,07,28); 
	$('.countdown').countdown({until: liftoffTime, layout: '{dn} {dl}'});

// nospam

	$('a.nospam').nospam({ replaceText: true });
	$('a#nospam2').nospam({ replaceText: false });


// form

$('.message').hide();

var options = { 
	target:        '#alert',
	success:  example
}; 

$('#contact_form').ajaxForm(options); 



function example() 
{ 

$('.inp_txt').example(function() {
		return $(this).attr('title');
	},
	{ 
		hide_label: true
	});
};


// Open links in new window
	
	$('.newWin').click( function() { 
		
		url = $(this).attr("href");
		window.open(url);
		
		return false;	
	});
	
 // More Projects
 
 $('.extend').hide();
 
 $('.more').click( function(){
								
	$('.extend').animate({
      "height": "toggle", "opacity": "toggle"
    }, { duration: "slow" });

	$(this).toggleClass("hideItem");

});


});
