/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(document).ready(initHome);

function initHome()
{

    $("a#option-register").click(function() {
        $(this).addClass('option-selected');
        $('#option-login').removeClass('option-selected');
        $('#login').hide('fast');
        $('#register').show('fast');
        $('#first_name').focus();

      //$("#id_gender").val("M");
      return false;
    });

    $("a#option-login").click(function() {
        $(this).addClass('option-selected');
        $('#option-register').removeClass('option-selected');
        $('#register').hide('fast');
        $('#login').show('fast');
        $('#username').focus();
      return false;
    });

    $('#slideshow').cycle({
        fx:     'fade',
        speed:   500,
        timeout: 3000,
        next:   '#slideshow',
        pause:   2
    });

    // Tabs
//    $('#tab-sidebar').tabs({ fxSlide: true });

    //$("#first_name").focus();
    $("#homesearch").focus();

    $('.featuredbox-entry').hover(function() {
        $(this).addClass('featuredbox-entry-hover');
    }, function() {
        $(this).removeClass('featuredbox-entry-hover');
    });
    
    $(".featuredbox-entry").click(function(){
    	window.location=$(this).find("a").attr("href"); return false;
  	});
}

