function supportsRGBA() { if(!('result' in arguments.callee)) { var scriptElement = document.getElementsByTagName('script')[0]; var prevColor = scriptElement.style.color; var testColor = 'rgba(0, 0, 0, .5)'; if(prevColor == testColor) { arguments.callee.result = true; } else { try { scriptElement.style.color = testColor; } catch(e) {} arguments.callee.result = scriptElement.style.color != prevColor; scriptElement.style.color = prevColor; } } return arguments.callee.result; } (function($){ $.fn.extend({ //pass the options variable to the function cookieNotice: function(options) { //Set the default values, use comma to separate the settings, example: var defaults = { title: 'Campden BRI Cookie Policy', url: '#', linkText: ' - See how to change settings »', subtitle: 'We use cookies but they\'re harmless. Follow the link to read more', url: '#', linkText: ' - See how to change settings »', css: { background:'#000', borderTop:'1px solid #cdcbcb', borderRadius:'0em 0em 0em 0em', position:'fixed', color:'#C4C3C6', lineHeight: '1.2em', bottom:'0em', padding:'.8em 0em', width: '100%', maxWidth: '100%', fontFamily: 'Arial, sans-serif', boxShadow: '.125em .125em .5em #dcdcdc', zIndex:'10000' }, rgbaback : 'rgba(0, 0, 0, 0.90)', delay: 500 }; if(supportsRGBA()){ defaults.css.background = defaults.rgbaback; } var options = $.extend(defaults, options); $.extend(defaults, options); options.css.left = "0em"; if($.cookie("cookieNoticeDisplayed2")){ return; } //whatever shizzles here $('body').append('