$(document).ready(function() {
	$('input[value]').each(function(){
		if(this.type == 'text') {
			$(this).focus(function(){ if (this.value == this.defaultValue) { this.value = ''; }});
			$(this).blur(function(){ if (!this.value.length) { this.value = this.defaultValue; }});
		}
	});
	$('#featuredposts').jcarousel({
		wrap: "both",
		size: 11,
		initCallback: carousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
    });
});

$(function() {
  if($.cookie('dont_show_footer_form') == null){
    $('#footerform').slideDown("slow");
  }
});


function slidedown() {
  $(function() {
    $("#dontshowanymore").click(function() { $.cookie('dont_show_footer_form', 'true', { expires: 3650, path: '/', domain: 'shabbir.in' }); });
	$("#closefornow").click(function() { $.cookie('dont_show_footer_form', 'true'); });
    $('#footerform').slideUp("slow");
  });
}


function carousel_initCallback(carousel)
{
    $('.controls li a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });
};
