
$(document).ready(function() {


	/* search */
	$('#keyword').focus( function() { $(this).attr('value', '') } );



    /* fan types */
    if($(".fantypes").length>0){

        if($(".fantypes option:selected").length>0)
        {
            $(".fantypes option:selected").attr('selected', true)
        }
        else
        {
            $(".top_el").attr('selected', true)
        }
    }
    
    $(".fantypes").change( function () {
		// simple request
		cat = $(this).val()		
		window.location = cat
    });
    
    $(".fans").change( function () {
		// simple request
		fan = $(this).val()		
		window.location = fan
    });


    if($(".category_fan_types").length>0){

        if($(".category_fan_types option:selected").length>0)
        {
            $(".category_fan_types option:selected").attr('selected', true)
        }
        else
        {
            $(".top_el").attr('selected', true)
        }
    }
    
    $(".category_fan_types").change( function () {
        window.location = $(this).val()
    })


    



    if($('.photo-gallery').length>0)
    {
        $(function() {
            $('.photo-gallery a.lbox').lightBox({
            fixedNavigation:true,
            txtImage: $(this).attr('title')
          });
        });
    }
    
    
});






function capitalizeMe(val) {
    
        newVal = '';
        val = val.split(' ');
        for(var c=0; c < val.length; c++) {
                newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length) + ' ';
        }
        val = newVal;
        return val 
}








