jQuery(document).ready(function($) {
$('.cannan-search-sidebar form input[type=submit]').after('');
$('.cannan-search-error-page form input[type=submit]').after('');
$('.cannan-search-mobile-menu form input[type=submit]').after('');
$('.cannan-tab-content .tab-pane:eq(0)').addClass('in active');
$('.cannan-tab .text-center:eq(0)').addClass('active');
});
jQuery(document).ready(function($){
initGmap();
function initGmap(){
var cannan_theme_path = $('#cannan-theme-path').attr('data-cannan-theme-path');
var image = cannan_theme_path+'/img/map_pin.png';
var maplocation = jQuery(".gmap").attr("data-address");
jQuery(".gmap").gmap3({
marker: {
address: maplocation,
options: {
icon: image,
}
},
map:{
options:{
zoom: 16,
zoomControl: true,
mapTypeControl: false,
scaleControl: false,
scrollwheel: false,
navigationControl: true,
streetViewControl: false,
draggable: true,
styles: [
{
"featureType":"all",
"elementType":"all",
"stylers":[
{ "saturation":"-30" }
]
}]
}
}
});
}
$(".gmap-btn").on("click", function() {
$(this).toggleClass("opened");
$(".gmap").toggleClass("opened");
if ($(this).text() == "Close Map")
$(this).text("Open Map")
else
$(this).text("Close Map");
});
});