/* global jQuery:false */
/* global FISHING_CLUB_STORAGE:false */
/* global TRX_ADDONS_STORAGE:false */

jQuery(document).on('action.add_googlemap_styles', fishing_club_trx_addons_add_googlemap_styles);
jQuery(document).on('action.init_shortcodes', fishing_club_trx_addons_init);
jQuery(document).on('action.init_hidden_elements', fishing_club_trx_addons_init);

// Add theme specific styles to the Google map
function fishing_club_trx_addons_add_googlemap_styles(e) {
	TRX_ADDONS_STORAGE['googlemap_styles']['dark'] = [
    {
        "stylers": [
            {
                "hue": "#ff1a00"
            },
            {
                "invert_lightness": true
            },
            {
                "saturation": -100
            },
            {
                "lightness": 33
            },
            {
                "gamma": 0.5
            }
        ]
    },
    {
        "featureType": "water",
        "elementType": "geometry",
        "stylers": [
            {
                "color": "#2D333C"
            }
        ]
    }
];
}


function fishing_club_trx_addons_init(e, container) {
	"use strict";
	if (arguments.length < 2) var container = jQuery('body');
	if (container===undefined || container.length === undefined || container.length == 0) return;

	container.find('.sc_countdown_item canvas:not(.inited)').addClass('inited').attr('data-color', FISHING_CLUB_STORAGE['alter_link_color']);
}

