jQuery(function(){ var $body = jQuery('body'); var ie = (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 8) ? true:false; if(ie) { jQuery("#bg img").hide(); jQuery("#bg").css({"position":"absolute","top":"0","left":"0","width":"100%","height":"100%"}); } if ($body.hasClass('home')){ jQuery("#bg img").attr("src", "https://www.casasflowers.com/events/weddingImages/background-defaults/Florist-Wedding-Flowers-Photo-Gallery.jpg"); if(ie) jQuery("#bg").css({"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/Florist-Wedding-Flowers-Photo-Gallery.jpg', sizingMethod='scale');","-ms-filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/Florist-Wedding-Flowers-Photo-Gallery.jpg', sizingMethod='scale')"}); } else if ($body.hasClass('single-post')){ jQuery("#bg img").attr("src", "https://www.casasflowers.com/events/weddingImages/background-defaults/About-Our-Wedding-Flowers.jpg"); if(ie) jQuery("#bg").css({"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/About-Our-Wedding-Flowers.jpg', sizingMethod='scale');","-ms-filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/About-Our-Wedding-Flowers.jpg', sizingMethod='scale')"}); } else { jQuery("#bg img").attr("src", "https://www.casasflowers.com/events/weddingImages/background-defaults/Wedding-Resources-Trivia.jpg"); if(ie) jQuery("#bg").css({"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/Wedding-Resources-Trivia.jpg', sizingMethod='scale');","-ms-filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://www.casasflowers.com/events/weddingImages/background-defaults/Wedding-Resources-Trivia.jpg', sizingMethod='scale')"}); } });