
$( document ).ready(
    function()
    {
        $( '#guessWhat' ).hover(
            function()
            {
                $( '#guessWhatPop' ).show();
            },
            function()
            {
                $( '#guessWhatPop' ).hide();
            }
        );  
        
        
        if( $( '.d' ).is( '*' ) )
        {
            $( '.d' ).dialog( { modal: true, minWidth: 500, minHeight: 120 } );
        }
        
        $( 'td.delivery-options form div input[type="radio"]' ).click(
            function()
            {
                $( this ).hide();
                $( this ).parent().children( 'img' ).show();
            }
        );

    	/*		
		$( 'li.over, div.over' ).hover(
			function()
            {
				$( this ).css( 'background-image', $( this ).css( 'background-image' ).replace( 'open', 'over' ) );
			},
			function()
			{
                if( $( this ).hasClass( 'current' ) )
                {
                    $( this ).css( 'background-image', $( this ).css( 'background-image' ).replace( 'open', 'over' ) );
                }
                else
                {
				    $( this ).css( 'background-image', $( this ).css( 'background-image' ).replace( 'over', 'open' ) );
                }
            }
		);
        */
        
        $( '#findus-tabs ul li a:first-child' ).click(
            function( ev )
            {
                $( '#findus-tabs li.current' ).removeClass( 'current' );
                $( this ).parent().addClass( 'current' );
     
            }
        );
        $( 'img.over' ).hover(
				function()
				{
					$( this ).attr( 'src', $( this ).attr( 'src' ).replace( 'open', 'over' ) );
				},
				function()
				{
					$( this ).attr( 'src', $( this ).attr( 'src' ).replace( 'over', 'open' ) );
				}
			);
		
    }
);
