

// this is the document ready section only

$(document).ready(function() {
		

    $(".checkLine").hover( function() { $(this).toggleClass('ui-state-highlight'); });		

    $(".anav2").hover( function() { $(this).toggleClass('menuOver'); });

    $(".anav2selected").hover( function() { $(this).toggleClass('menuOverSel'); });

	$(".showHoverBrief").hover( function() {
          var $hoverID = $(this).attr('rel');
          $('#'+$hoverID).toggleClass('showBrief');
	});

// fancybox

    $(".imagePop").fancybox({
        'hideOnContentClick' : true,
        'titlePosition' : 'over',  
        'titleShow' : false, 
        'onComplete'    :   function() {
            $("#fancybox-wrap").hover(function() {
                $("#fancybox-title").show();
                }, function() {
                    $("#fancybox-title").hide();
               });
        }
    });  
    
	$(".mlsPop").fancybox({
		'hideOnContentClick' : 'true',
        'titleShow' : 'false'
	});  	
	$(".mapPop").fancybox({
    	'title' : 'Map',   
        'padding':  5, 
        'width': 640,     
        'height':460,
        'titleShow':false,
        'transitionIn': 'fade',     
        'type': 'iframe'
	}); 
    $(".tourPop").fancybox({
		'title' : 'Tour',   
    	'padding':  5,
    	'width': 670,
    	'height':540,
    	'titleShow':false,
    	'transitionIn': 'fade',
    	'type': 'iframe'
	}); 

    
// gallery tool - slideshow starts on click from the photo you start with auto advanced with timeout
        $("a[rel=gallery]").fancybox({
            'transitionIn'      : 'fade',
            'transitionOut'     : 'fade',
            'autoScale'         : false, 
            'autoDimensions'    : false, 
            'hideOnContentClick' : 'true', 
            'titleShow' 		: 'false', 
            'cyclic'            : 'true',  
            'onComplete'        :   function() {
                setTimeout('$.fancybox.next();','6000'); }
//                'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
//                    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '       ' + title + '</span>';
//                }
            });  



});


