$(document).ready(function(){   



$('#tab-daily tr:odd, #comments tr:odd, #events tr:odd').addClass('odd');
$('#tab-daily tr:even, #comments tr:even, #events tr:even').addClass('even');

$('#tab-ongoing tr:odd').addClass('odd');
$('#tab-ongoing tr:even').addClass('even');

//Jquery UI Tabs
$( "#tabs" ).tabs(); 
$( "#event_calendar_comments" ).tabs(); 

/*
//Jquery UI Cal
$( "#cal" ).datepicker();
 

//Cycle Thumb Galleries
    $('.pictures').cycle({
	fx: 'scrollLeft',
	speed:4000,
	speedIn: 1000,
    speedOut: 1000,
    prev: '.prev', 
    next: '.next',
    fit: true,
    width: 675,
    cleartypeNoBg: true
	});
*/

// starting the script on page load
	$('a.normalTip').aToolTip({   fixed: false,                   // Set true to activate fixed position  
        clickIt: false,                 // set to true for click activated tooltip  
        inSpeed: 200,                   // Speed tooltip fades in  
        outSpeed: 100,                  // Speed tooltip fades out  
        tipContent: '',                 // Pass in content or it will use objects 'title' attribute  
        toolTipClass: 'defaultTheme',   // Set class name for custom theme/styles  
        xOffset: 5,                     // x position  
        yOffset: 5,                     // y position  
        onShow: null,                   // callback function that fires after atooltip has shown  
        onHide: null                    // callback function that fires after atooltip has faded out      
    });

});

function onLocationChanged(isFound) {
    if (isFound) {
        $(".search-tog").trigger("click").text("Loading...");
        window.location.href = '/';
    } else {
        $('#chooseLocation .msg').hide();
        $('#chooseLocation .field-validation-error').show();
        $('#location_dropdown input').removeAttr('disabled');
    } 
};

