(function(b){var a=function(){return{showCoupon:function(g){g=b.extend({baseUrl:"http://localhost/smartoffers/main",style:"style1",packages:["/v8/global/js/jquery/jquery.cookie.js","/v8/global/js/jquery/facebox/facebox.js"],make:null,model:null,year:null,title:"",width:710,height:460,timeout:1000,showOnce:true,popUnder:false,showLauncher:false,launcherMessage:""},g);var j="ddcsmartoffers",f="",e=[g.baseUrl,"?style="+g.style,"&KeepThis=true",g.make?("&make="+g.make):"",g.model?("&model="+g.model):"",g.year?("&year="+g.year):""].join(""),h=function(){var k=window.open(e,"smartoffers","width="+(g.width+50)+",height="+(g.height+50)+",scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0");k.blur();window.focus();b.facebox.close()},c=function(){b.facebox('<iframe src="'+e+'" frameborder="0" style="width: '+g.width+"px; height: "+g.height+'px;" src="" hspace="0"></iframe>');if(g.popUnder){b("#facebox .close").bind("click.popUnder",h)}},d=function(){b('<div id="soLauncher"><a href="#"><span>'+g.launcherMessage+"</span></a></div>").appendTo("body");b("#soLauncher").animate({top:0}).click(function(){c();return false})},i=function(m){m=b.extend({packages:[],callback:function(){}},m);var l=0,k=function(){if((m.packages instanceof Array)&&m.packages.length){b.getScript(m.packages[l],function(){if(l===m.packages.length-1){if(typeof m.callback==="function"){m.callback.apply(window)}}else{l=l+1;k()}})}};b(k)};if(g.baseUrl){i({packages:g.packages,callback:function(){f=b.cookie(j);setTimeout(function(){if(g.showOnce&&(f!=="true")){c();b.cookie(j,"true",{path:"/"})}else{if(!g.showOnce){c()}}if(g.showLauncher){d()}},g.timeout)}})}}}}();window.DDC=window.DDC||{};window.DDC.SmartOffers=a})(jQuery);