$(function(){
    
    /*
     * Pretty forms
     */
    $('form.prettyform input[type*=radio]').css('border','none');
    $('form.prettyform input[type*=checkbox]').css('border','none');
    if($.browser.mozilla) { prettyform(); }
    
    /*
     * LI hover fix for IE6
     */
    $('#navigation ul li').each( function(){
        $(this).mouseover( function(){ $(this).addClass('hover'); } ).mouseout( function(){ $(this).removeClass('hover'); } );
    });
    
    /*
     * Blur on focus
     */
    $('a').focus(function() { this.blur(); });
    $('input[type*=submit]').focus(function() { this.blur(); });
    $('input[type=text], input[type=password]').addClass("input");
    $('.required').append(" <span>*</span>");
	
	/* Slideshow */
	$('#slideshow')
	.cycle({
		fx:     'fade', 
		speed:  'slow', 
		timeout: 5000, 
		pager:  '#slideshownav',
		pause: 1
	});
	
	$(".youtube").colorbox({iframe:true, innerWidth:500, innerHeight:400});
	
	$('.cycle').cycle({pause:1,timeout:5000});
	
	$('#gallery-search-results input#gallery-search-button').attr("value","GO >");
	
});


/*
 * Pretty forms
 */
function prettyform(){
  /*
   * Hide forms
   */
  $( 'form.prettyform' ).hide().end();
  /*
   * Label & list formatting
   */
  $( 'form.prettyform' ).find( 'label' ).not( '.noprettyform' ).each( function( i ){
    var labelContent = this.innerHTML;
    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
    var labelSpan = document.createElement( 'span' );
        labelSpan.style.display = 'block';
        labelSpan.style.width = labelWidth;
        labelSpan.innerHTML = labelContent;
    this.style.display = '-moz-inline-box';
    this.innerHTML = '';
    this.appendChild( labelSpan );
  } ).end();
  
  /*
   * Show forms
   */
  $( 'form.prettyform' ).show().end();
}


function SendPasswordWindow() {
spWindow = window.open('http://djfinder.com/sendpassword.asp?typeoflogon=client','spWindow','width=350,height=150,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,status=no');
spWindow.focus();
}
