');
});
$('#ulAdmin li a').each(function(){
$adminname = $(this).text();
$adminname = $adminname.replace(' Admin','');
$(this).text($adminname);
});
// VENUE PAGES
// Changing social media buttons markup
$('.venue-social a').each(function(){
$(this).empty();
});
// Change venue address
$('.venue-contact dd:first-child').each(function(){
$address = $(this).html();
$address = $address.replace(/
/gi,', ');
$address = $address.replace(/, , , /gi,', ');
$address = $address.replace(/, , /gi,', ');
$address = $address.replace(', UNITED KINGDOM,','');
$(this).empty().text($address);
});
// Remove text from number
$('.msl_phone').each(function(){
$phone = $(this).text();
$phone = $phone.replace('Tel:','');
$(this).text($phone);
});
// Change map width
$('#venue-map iframe').each(function(){
$width = $(this).parent().innerWidth();
$(this).attr('width',$width);
});
// Change map location
$('#venue-map iframe').each(function(){
$mapsrc = $(this).attr('src');
$mapsrc = $mapsrc.replace('VENUEADDRESS', $address);
$(this).attr('src',$mapsrc);
});
// Events Calendar
$(document).on('click','.msl_event_calendar td',function(){
$('.msl_event_calendar td').removeClass('active');
$('#events-calendar-list').empty();
$(this).addClass('active');
$dailylist = $(this).find('.msl-cal-wrapper').html();
$month = $('.msl_event_calendar_title td:nth-child(2)').text();
$('#events-calendar-list').prepend('What\'s On: ').append( $dailylist );
$('#events-calendar-list .msl-cal-hoverbox').before( ' ' + $month );
});
// EVENTS
// Rearrange elements for tickets section
$('.event_ticket').each(function(){
$ticket_quantity = $(this).find('select');
$ticket_title = $(this).find('span');
$ticket_buy = $(this).find('input[type="submit"]');
$(this).empty();
$(this).append($ticket_title,$ticket_quantity,$ticket_buy);
$(this).find('span').wrap('
');
$(this).find('select').wrap('
');
$(this).find('input[type="submit"]').val('Buy Now').wrap('
');
});
});
$(document).foundation();