
// MOSNE FUNCTIONS

$(document).ready(function(){

    var ea = 'easeInOutQuad';
    
    
    $(".home #menu a").hover(function(){
        idx = $(".home #menu a").index($(this));
        $(".home #omini a:eq("+idx+")").css({visibility:"visible"});
        
    },function(){
        
         idx = $(".home #menu a").index($(this));
         $(".home #omini a:eq("+idx+")").css({visibility:"hidden"});
    
    });
    
        $("a[rel^='gallery']").fancybox({
				'transitionIn': 'fade',
				'transitionOut': 'fade',
				'padding':0,
                'margin':50,
				'titleShow': true,
				'overlayColor': '#8555FF'
			});
    
     $('.roll').cycle({
        fx: 'fade',
        timeout: 8000,
        slideExpr: 'a',
        speed: 1200
	}); 
	
	
    $('.pics').cycle({
        fx: 'fade',
        timeout: 0,
        slideExpr: 'a',
        speed: 550
	}); 
	
	
	$(".pics_choose a").live("click", function (e) {
	    e.preventDefault();
        $('#m_grid').trigger('click');
        var el = $(this);
        var idx = $(".pics_choose a").index($(this));
        if (idx >= 0) {
            $(".pics").cycle(idx);
        }
    });
    
    $('#menu-nav a[href^="'+$("#control").html()+'"]').parent().addClass("current-menu-item");
    
    
    var s_infobox = {
			 content: "",
			 disableAutoPan: false,
			 maxWidth: 0,
			 pixelOffset: new google.maps.Size(-110, 5),
			 zIndex: null,
			 boxStyle: { 
			 background: "url('/wp-content/themes/wallace/images/infobox_top.png') center top no-repeat",
			 color:'#58585A',
			 padding: '0',
			 width: "220px"
			 },
			  closeBoxMargin: "16px 4px",
			 closeBoxURL: "/wp-content/themes/wallace/images/infobox_close.png",
		     infoBoxClearance: new google.maps.Size(1, 1),
			 isHidden: false,
			 pane: "floatPane",
			 enableEventPropagation: false
    };

    
    
    $("#map").mosne_map({
                    mode:'address',
                    elements:'.location',
                    clat: 55.974752,                // set the lat default map center
                    clng: -3.167097,                // set the lng default map center
                    infowindows: false,              // shows infoWindows grabing html from the .infobox element
                    infobox: true,                 // enable custom infoWindows using infobox class
                    infobox_s: s_infobox,           // default color scheme for custom infobox container
                    fitbounds: false,               // on|off fit bounds
                    defzoom : 13                   // default zoom level if fitbounds is off
                    });
    
}); //scope 






