BC=(typeof BC=="undefined"?{}:BC);BC.classes=(typeof BC.classes=="undefined"?{}:BC.classes);BC.classes.roundedCorners=function(A){if(!(jQuery.browser.msie&&jQuery.browser.version<9)){return}this.imagePath="/templates/images/global/rounded-corners/";this.lteIE6=(jQuery.browser.version<7);var B=[];B.push({element:"body.home #compare div.panel",dimension:"5",image:"panel-compare.gif"});B.push({element:"body.servicing #vehicle",dimension:"5",image:"panel-vehicle.gif"});B.push({element:"body.servicing #services",dimension:"5",image:"panel-services.gif"});B.push({element:"body.servicing #mot",dimension:"5",image:"panel-services.gif"});B.push({element:"body.garage #main-content div.find-a-garage",dimension:"5",image:"panel-5px.gif"});B.push({element:"body.garage #main-content div.garage",dimension:"5",image:"panel-services.gif"});B.push({element:"body.account #main-content div.one-search",dimension:"8",image:"panel-8px.gif"});B.push({element:".alert.feedback",dimension:"8",image:"alert-green.png"});B.push({element:".alert.error",dimension:"8",image:"alert-red.png"});B.push({element:"#main-content dl.tyre-brands dd.logo",dimension:"8",image:"panel-8px.gif"});B.push({element:"body.buy-tyres #main-content div.tyre-search",dimension:"5",image:"panel-5px.gif"});B.push({element:"#main-content div.results-filter",dimension:"5",image:"panel-services.gif"});B.push({element:"body.buy-tyres #main-content div.tyre",dimension:"5",image:"panel-services.gif"});B.push({element:"body.buy-tyres #main-content div.tyre.recommended",dimension:"5",image:"panel-recommended.gif"});B.push({element:"body.buy-tyres div.browse-by-map",dimension:"5",image:"browse-by-map.gif"});B.push({element:"body.buy-tyres div.browse-by-map h2",dimension:"5",image:"browse-by-map.gif"});B.push({element:"body.buy-tyres div.browse-by-map div.garage",dimension:"5",image:"panel-selected-garage.gif"});B.push({element:"#extra .smartfinder",dimension:"5",image:"panel-dont-know-size.gif"});B.push({element:"body.buy-tyres.garage div.find-a-garage",dimension:"5",image:"panel-compare.gif"});B.push({element:"#nearly-finished fieldset.other-checks",dimension:"6",image:"nearly-finished.gif"});B.push({element:"body.affinity #mailing-list",dimension:"6",image:"mailing-list.png"});B.push({element:"body.otherservices #main-content div.OptionsRow",dimension:"5",image:"panel-5px.gif"});B.push({element:"body.otherservices #main-content div.ServicesResultsContainer",dimension:"5",image:"panel-5px.gif"});var C=$("#alternative-search").show();this.make(B);C.hide();$("body.buy-tyres #main-content div.browse-by-map > span.rounded-corner.top.left").toggle(false);$("body.buy-tyres #main-content div.browse-by-map h2 span.rounded-corner.bottom").toggle(false)};BC.classes.roundedCorners.prototype.createCornerSpan=function(C,B){var A=$(document.createElement("span"));A.addClass("rounded-corner");A.css("position","absolute");A.css("background-repeat","no-repeat");A.css("background-position",C+" "+B);A.addClass(C+" "+B);if(this.lteIE6){A.css("fontSize","0");A.addClass(B+"-"+C)}return A};BC.classes.roundedCorners.prototype.customiseCorner=function(D,E,A,B){if(this.lteIE6){if($(A).hasClass("bottom")&&D.clientHeight%2){$(A).css("bottom",(-B-1)+"px")}if($(A).hasClass("right")&&D.clientWidth%2){$(A).css("right",(-B-1)+"px")}}var C=E.dimension+"px";$(A).css("width",C);$(A).css("height",C);$(A).css("background-image","url("+this.imagePath+E.image+")");return A[0]};BC.classes.roundedCorners.prototype.make=function(F){var D=this.createCornerSpan("left","top");var C=this.createCornerSpan("right","top");var E=this.createCornerSpan("left","bottom");var B=this.createCornerSpan("right","bottom");_this=this;for(var A in F){var G=F[A];$(G.element).each(function(){var I=$(this).css("position");if(typeof I=="undefined"||!I||I=="static"){$(this).css("position","relative")}var J=($(this).outerWidth(false)-$(this).innerWidth())/2;var H="-"+J+"px";D.css({"left":H,"top":H});C.css({"right":H,"top":H});E.css({"left":H,"bottom":H});B.css({"right":H,"bottom":H});this.appendChild(_this.customiseCorner(this,G,D.clone(),J));this.appendChild(_this.customiseCorner(this,G,C.clone(),J));this.appendChild(_this.customiseCorner(this,G,E.clone(),J));this.appendChild(_this.customiseCorner(this,G,B.clone(),J))})}};$(document).ready(function(){new BC.classes.roundedCorners()});
