$(document).ready(function(){ if($(".inner-tab").length > 0) { $(".inner-tab").hide(); $("#tab-contact").show(); $("#content-inner-tabs-contact").addClass("selected"); $("#tab-diagnostic").show(); $("#content-inner-tabs-diagnostic").addClass("selected"); $("#tab-faq").show(); $("#content-inner-tabs-faq").addClass("selected"); $(".inner-tabs").click(function() { $(".inner-tabs").removeClass("selected"); $(this).addClass("selected"); $(".inner-tab").hide(); var tabs = $(this).attr("id").split("-"); var tabClicked = "#tab-" + tabs[3]; $(tabClicked).show(); return false; }); } $('#homepage-box :last').addClass('homepage-box-last'); $('#homepage-box :first').addClass('homepage-box-first'); $('#homepage-box').wrapInner($('
')); $('#homepage-box').prepend($('')); $('#homepage-box').append($('')); // // if($("a#viewmap-link").length > 0) { // $(function() { // $('a#viewmap-link').lightBox({fixedNavigation:true}); // $('a#viewmap-image').lightBox({fixedNavigation:true}); // }); // } // // enhanced homepage version with png alpha transparency for supported browsers if (!$.browser.msie || ($.browser.msie && $.browser.version >= 7.0)) { $('#container').addClass('enhanced'); } // add helper class to lists for css styling $('ul li:last-child').addClass('last'); function clean(value) { if (value === null) { return; } value = unescape(value); return value.replace(/\+/g, ' '); } // automatically populate search fields if($('#search-criteria-specialty').length > 0) { var options = {}; $('#doctor-specialty optgroup').hide(); $.each($('#doctor-specialty optgroup'),function(){ var element = $(this); if (element.attr('label').length > 0) { options[element.attr('label')] = element.find('option'); element.remove(); } }); $('#body-area').change(function(e){ var element = $(this); var doctorSpecialityElement = $('#doctor-specialty'); doctorSpecialityElement.empty(); if (element.val().length > 0) { var optionSet = options[element.val()]; doctorSpecialityElement.append(optionSet); doctorSpecialityElement.prepend(''); } doctorSpecialityElement.attr('selectedIndex', 0); loadRecent(); }); function loadRecent() { var recent = $.cookie('recent_doc_spec'); if (recent) { $(recent.split('|')).each(function(i, name){ $('#doctor-specialty option[value=' + name + ']:not(.likely)').addClass('likely'); }); } } loadRecent(); } if ($('body').is('#service-search')) { var loadRecentServices = function(){ var recent = $.cookie('recent_service_type'); if (recent) { $(recent.split('|')).each(function(i, name){ $('#location-type option[value=' + name + ']:not(.likely)').addClass('likely'); }); } }(); } var doctorElem = $('#doctor-search'); if (doctorElem.length > 0) { var name, state, suburb, postcode, language, speciality, bodyarea, gender; state = $.cookie('state'); name = $.cookie('doctor_search_name'); suburb = $.cookie('doctor_search_suburb'); postcode = $.cookie('doctor_search_postcode'); language = $.cookie('doctor_search_language'); gender = $.cookie('doctor_search_gender'); speciality = $.cookie('doctor_search_doctor_specialty'); bodyarea = $.cookie('doctor_search_body_area'); $('#doctor-search-state').val(clean(state)); $('#doctor-search-suburb').val(clean(suburb)); $('#doctor-search-name').val(clean(name)); $('#doctor-search-language').val(clean(language)); $('#doctor-search-postcode').val(clean(postcode)); $('#doctor-search-gender').val(clean(gender)); $('#body-area').val(clean(bodyarea)); $('#doctor-specialty').val(clean(speciality)); } var serviceElem = $('#service-search'); if (serviceElem.length > 0) { var name, state, suburb, postcode, more_detail; name = $.cookie('service_search_name'); type = $.cookie('service_search_location_type'); more_detail = $.cookie('service_search_more_detail'); state = $.cookie('state'); suburb = $.cookie('service_search_suburb'); postcode = $.cookie('service_search_postcode'); $('#service-search-state').val(clean(state)); $('#service-search-suburb').val(clean(suburb)); $('#service-name').val(clean(name)); $('#service-search-postcode').val(clean(postcode)); $('#more-detail').val(clean(more_detail)); $('#location-type').val(clean(type)); } });