var base_url = 'http://www.cagefreeorganic.com'; $(document).ready(function() { // search bar submission $('#btn-search').click(function() { $('#form-search').submit(); }); // set up lightbox $('a.lightbox').lightBox({ imageLoading: base_url + '/wp-content/themes/wilcox/images/lightbox/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon imageBtnPrev: base_url + '/wp-content/themes/wilcox/images/lightbox/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image imageBtnNext: base_url + '/wp-content/themes/wilcox/images/lightbox/lightbox-btn-next.gif', // (string) Path and the name of the next button image imageBtnClose: base_url + '/wp-content/themes/wilcox/images/lightbox/lightbox-btn-close.gif', // (string) Path and the name of the close btn imageBlank: base_url + '/wp-content/themes/wilcox/images/lightbox/lightbox-blank.gif' }); // config var config = { sensitivity: 1, // number = sensitivity threshold (must be 1 or higher) interval: 50, // number = milliseconds for onMouseOver polling interval over: megaHoverOver, // function = onMouseOver callback (REQUIRED) timeout: 500, // number = milliseconds delay before onMouseOut out: megaHoverOut // function = onMouseOut callback (REQUIRED) }; // set up tabs $("ul#topnav li .sub").css({'opacity':'0'}); $("ul#topnav li").hoverIntent(config); // set up the tabs on Product pages $(".css-tabs:first").tabs(".css-panes:first > div"); // strip the calendar $(".stripeme tr.row:even").addClass('alt'); // set base path var base_path = base_url + '/wp-content/themes/wilcox/images/sustainable-farming/'; $('#organic_cage_free_chickens').mouseover(function() { $('#sustainable_image').removeClass(); $('#sustainable_image').html(''); /* $('#sustainable_image').css('background', 'url(' + base_path + 'organic_cage_free_chickens.png)'); */ $('#sustainable_image').html( '

Aviary System

' ); }); $('#organic_compost_blog').mouseover(function() { $('#sustainable_image').removeClass(); $('#sustainable_image').html(''); /*$('#sustainable_image').css('background', 'url(' + base_path + 'organic_compost_blog.png)'); */ $('#sustainable_image').html( '

Organic Compost Blog

' ); }); $('#sustainable_green_farming').mouseover(function() { $('#sustainable_image').removeClass(); $('#sustainable_image').html(''); /* $('#sustainable_image').css('background', 'url(' + base_path + 'sustainable_green_farming.png)'); */ $('#sustainable_image').html( '

Sustainable Green Farming

' ); }); $('#salmon_safe').mouseover(function() { $('#sustainable_image').removeClass(); $('#sustainable_image').html(''); /* $('#sustainable_image').css('background', 'url(' + base_path + 'salmon_free.png)'); */ $('#sustainable_image').html( '

Salmon Safe

' ); }); });