$(function() {
		/*Carusel*/
		$(".feature_pixels").jCarouselLite({
			btnNext: ".next",
			btnPrev: ".prev",
			visible: 2,
			scroll: 1,
			circular: true,
			speed: 500
		});
	});
	
	/*Title in fancybox*/
	$(document).ready(function() {
	
		function formatTitle(title, currentArray, currentIndex, currentOpts) {
			return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) +  '</div>';
	}

	/*Fancybox*/
	$("a#single_image").fancybox({
		'titlePosition' 	: 'inside',
		'titleFormat'		: formatTitle
	});
	
	/*Equalize Heights of .pixel_box*/
/*	var maxHeight = 0;
	
	$(".pixel_box ").each(function(){
	   if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
	});
	
	$(".pixel_box ").height(maxHeight);*/
	
});

$(document).ready(function() {
	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
		
});

// jQuery Input Hints plugin
// Copyright (c) 2009 Rob Volk
// http://www.robvolk.com

jQuery.fn.inputHints=function() {
    // hides the input display text stored in the title on focus
    // and sets it on blur if the user hasn't changed it.

    // show the display text
    $(this).each(function(i) {
        $(this).val($(this).attr('title'))
            .addClass('hint');
    });

    // hook up the blur & focus
    return $(this).focus(function() {
        if ($(this).val() == $(this).attr('title'))
            $(this).val('')
                .removeClass('hint');
    }).blur(function() {
        if ($(this).val() == '')
            $(this).val($(this).attr('title'))
                .addClass('hint');
    });
};

$(document).ready(function() {
   $('input[title]').inputHints();
});

$('#container').masonry({
	itemSelector: '.box',
	columnWidth: 10,
	isAnimated: !Modernizr.csstransitions
});
