var snap_preview_anywhere_config = {version:"1.12",prefix:{image:"http://spa.snap.com/images/v1.12/",link:"http://spa.snap.com/",preview:"http://spa.snap.com/",bg:"http://spa.snap.com/images/v1.12/bg_spa",snap:"http://www.snap.com/",search:"http://www.snap.com/"},key:"f328946667fac04a7ca1141be03c8216",source:"www.alpheccar.org",flavor:null,search_box:true,auto_preview:true,show_internal:false,search_type:"snap",delay:{show:400,hide:150,move:200},text:{search_box:"Search the Web"},css_pos:{main:{x:0,y:0,w:306,h:299},body:{x:0,y:0,w:306,h:299},bg_img:{x:0,y:0,w:306,h:299},url:{x:15,y:6,w:245,h:20},url_a:{x:0,y:0,w:null,h:null},ques_a:{x:270,y:0,w:16,h:16},preview_div:{x:13,y:28,w:270,h:161},preview:{x:0,y:0,w:null,h:null},loading_img:{x:0,y:0,w:null,h:null},search:{x:0,y:197,w:306,h:30},logo_a:{x:15,y:197,w:46,h:18},logo:{x:0,y:0,w:46,h:18},box:{x:65,y:2,w:190,h:20},submit:{x:260,y:0,w:25,h:25},cobrand_a:{x:13,y:-20,w:null,h:null},cobrand_img:{x:0,y:0,w:87,h:19},power_a:{x:70,y:223,w:null,h:null}},offset:{body:{top:40,bottom:10}},hidden:["cobrand_a","cobrand_img"],retry_interval:[8000,5000,5000,5000,5000,5000],partial_check:{delay:2000,attempts:5},href:{ques:"http://www.snap.com/about/spa_faq.php",logo:"http://www.snap.com/about/spa1.php",power:"http://www.snap.com/about/spa1B.php"},cobrand:{href:"http://www.snap.com/",img:"http://spa.snap.com/images/v1.12/t.gif"},fl:""}; function snapPreviewAnywhere(){this.init();}snapPreviewAnywhere.prototype={div:null,timer_id:null,current_orientation:"lr",retry_url_list:{},div_added:null,current_element:null,current_url:null,init:function(){this.div={};this.retry_url_list={};this.timer_id={retry:null,show:null,partial:null};this.div_added=false;this.current_element=null;this.current_url=null;this.domain=null;this.cfg=snap_preview_anywhere_config;if(document.compatMode&&document.compatMode=="CSS1Compat"){this.cfg.css_pos.box.h-=5;this.cfg.css_pos.box.w-=8;}var _1=this;this.observe(window,"load",function(){_1.onload();});var _2=document.getElementById("snap_preview_anywhere");if(_2&&_2.defer){this.timer_id.partial=window.setTimeout(function(){_1.partial_check();},this.cfg.partial_check.delay);}},clear_timer:function(_3){if(this.timer_id[_3]){window.clearTimeout(this.timer_id[_3]);this.timer_id[_3]=0;}},campaign:function(_4){return "spa"+(_4?("_"+_4):"")+"!"+window.location.host.replace(/:\d+$/,"");},is_internal_link:function(_5){var _6=/^(http|file)s?:\/\/(www\.)?(.*?)\//;if(this.domain===null){var m=document.location.href.match(_6);if(m){this.domain=m[3];}else{this.domain="";}}var _8=_5.href.match(_6);if(_8&&(this.domain==_8[3])){return true;}else{return false;}},add_spa:function(_9){var _a=this;_9.snap_preview_added="spa";this.observe(_9,"mouseover",function(ev){_a.show_delay(ev,_a.cfg.delay.show,_a.cfg.delay.move);});this.observe(_9,"mouseout",function(ev){_a.hide_delay(ev,_a.cfg.delay.hide);});},conditional_add_spa:function(_d,_e){if(_d.snap_preview_added){return;}else{if(_d.className.indexOf("snap_nopreview")!=-1){_d.snap_preview_added="no";return;}}if((_d.className.indexOf("snap_preview")!==-1)||((_d.href.indexOf("https://")!=0)&&(this.cfg.auto_preview||_e)&&(this.cfg.show_internal||!this.is_internal_link(_d)))){this.add_spa(_d);}else{_d.snap_preview_added="no";}},add_link_events:function(){var _f;var _10=[];var _11=[];var _12=["div","span"];for(var tt=0;tt<_12.length;tt++){var els=document.getElementsByTagName(_12[tt]);for(var i=0;i10)||(!_1b.hasChildNodes())){return {};}var _1e=_1b.childNodes;for(var i=0;i<_1e.length;i++){node=_1e[i];if(node.id){var _20=node.id.match(/^snap_preview_anywhere_(\w+)/);if(_20){_1c[_20[1]]=node;}}this.get_all_spa_nodes(node,_1c,_1d+1);}return _1c;},is_element:function(el){if((typeof el)=="object"&&el.style){return true;}else{return false;}},set_css:function(){for(var el in this.div){if(!this.is_element(this.div[el])){continue;}this.div[el].style.margin="0 0 0 0";this.div[el].style.padding="0 0 0 0";this.div[el].style.border="0";this.div[el].style.fontStyle="normal";this.div[el].style.fontWeight="normal";this.div[el].style.fontFamily="\"trebuchet ms\", arial, helvetica, sans-serif";this.div[el].style.zIndex=Number(this.div[el].style.zIndex)+999999;}this.div.cobrand_a.href=this.cfg.cobrand.href;this.div.cobrand_img.src=this.cfg.cobrand.img;for(var i in this.cfg.css_pos){if(!this.is_element(this.div[i])){continue;}var pos=this.cfg.css_pos[i];this.div[i].style.position="absolute";if(pos.x!==null){this.div[i].style.left=pos.x+"px";}if(pos.y!==null){this.div[i].style.top=pos.y+"px";}if(pos.w!==null){this.div[i].style.width=pos.w+"px";}if(pos.h!==null){this.div[i].style.height=pos.h+"px";}}var bgs={ques_a:"-251px 0",logo:"-205px 0"};for(var i in bgs){if(!this.is_element(this.div[i])){continue;}this.div[i].style.backgroundColor="transparent";this.div[i].style.backgroundImage="url("+this.cfg.prefix.image+"spa_palette.gif)";this.div[i].style.backgroundPosition=bgs[i];this.div[i].style.backgroundRepeat="no-repeat";}this.div.url.style.overflow="hidden";this.div.url_a.style.fontSize="12px";this.div.url_a.style.fontWeight="bold";this.div.url_a.style.color="#003399";this.div.url_a.style.textDecoration="none";this.div.url_a.style.borderBottom="1px dotted #003399";this.div.url_a.style.textAlign="left";this.div.preview_div.style.border="2px solid #003399";this.div.preview_div.style.overflow="hidden";this.div.preview_div.style.backgroundColor="#FFFFFF";this.raise_loading_img();this.div.box.style.fontSize="10px";this.div.box.style.border="1px solid #cccccc";this.div.box.style.color="#333333";this.div.submit.src=this.cfg.prefix.image+"btn_srch.png";if(this.needs_png_fix){this.div.submit.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.div.submit.src+"',sizingMethod='scale')";this.div.submit.src=this.cfg.prefix.image+"t.gif";}this.div.submit.style.backgroundColor="transparent";this.div.box.style.padding="3px 0 0 6px";this.div.power_a.style.fontSize="9px";this.div.power_a.style.textDecoration="none";this.div.power_a.style.color="#717171";this.div.power_a.style.borderBottom="1px dotted #717171";for(var i=0;i\n
\n\n
\n\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n Get free previews from Snap.com\n
\n\n";this.get_all_spa_nodes(this.div.main,this.div);this.set_css();this.observe(this.div.main,"mouseover",function(ev){spa.highlight(true);});this.observe(this.div.main,"mouseout",function(ev){spa.highlight(false);spa.hide_delay(ev,100);});var spa=this;this.observe(this.div.preview,"load",function(ev){spa.check_image_status(ev);});var _2b=["img_a","url_a"];for(var i=0;i<_2b.length;i++){this.observe(this.div[_2b[i]],"mousedown",function(ev){spa.link_click("down");});this.observe(this.div[_2b[i]],"mouseout",function(ev){spa.link_click("out");});this.observe(this.div[_2b[i]],"mouseup",function(ev){spa.link_click("up");});this.observe(this.div[_2b[i]],"click",function(ev){spa.link_click("click");});}this.observe(this.div.search_form,"submit",function(ev){spa.form_submit(ev);});this.div.box.value=this.cfg.text.search_box;this.observe(this.div.box,"focus",function(ev){if(spa.div.box.value===this.cfg.text.search_box){spa.div.box.value="";}});var _33="?source="+encodeURIComponent(this.cfg.source)+"&campaign=";this.div.ques_a.href=this.cfg.href.ques+_33+this.campaign("question");this.div.logo_a.href=this.cfg.href.logo+_33+this.campaign("bsblogo");this.div.power_a.href=this.cfg.href.power+_33+this.campaign("link");this.div.search_form.action=this.cfg.prefix.search;var el=document.createElement("input");el.type="hidden";el.name="source";el.value=encodeURIComponent(this.cfg.source);this.div.search_form.appendChild(el);var el=document.createElement("input");el.type="hidden";el.name="campaign";el.value="";this.div.search_form.appendChild(el);this.div.form_campaign=el;this.orientation("bl");},raise_loading_img:function(){this.div.loading_img.style.zIndex=Number(this.div.preview.style.zIndex)+1;},lower_loading_img:function(){this.div.loading_img.style.zIndex=Number(this.div.preview.style.zIndex)-1;},move:function(x,y){this.div.main.style.left=x+"px";this.div.main.style.top=y+"px";},hide_delay:function(ev,_38){this.clear_timer("show");var spa=this;this.timer_id.show=window.setTimeout(function(){spa.hide();},_38);},hide:function(){this.div.main.style.visibility="hidden";},show_delay:function(ev,_3b,_3c){this.clear_timer("show");var _3d;if(ev.srcElement){_3d=ev.srcElement;}else{if(ev.target){_3d=ev.target;}}var ex=this.getPageX(ev);var ey=this.getPageY(ev);var _40=this.getViewportWidth();var _41=this.getViewportHeight();var _42=(ev.clientY>(_41/2))?"b":"t";_42+=(ev.clientX>(_40/2))?"r":"l";var _43=null;if(_3d){var _44=_3d;for(var i=0;(i<5)||(!_44);i++){if(_44.tagName=="A"&&_44.href){_43=_44;break;}_44=_44.parentNode;}}if(_43){var _46=_43.href.match(/^(http)s?:\/\/([^#]*)/);var _47=document.location.href.match(/^(http|file)s?:\/\/([^#]*)/);var spa=this;if(!_46||!_47||(_46[2]==_47[2])||(_46[1]!=="http")){return;}if(this.div.main.style.visibility!="visible"){this.timer_id.show=window.setTimeout(function(){spa.show(_43,ex,ey,_42,_3d);},_3b);}else{if(!_3d||(this.current_element!=_3d)){this.timer_id.show=window.setTimeout(function(){spa.show(_43,ex,ey,_42,_3d);},_3c);}}}},show:function(_49,ex,ey,_4c,_4d){if(this.div.url_a.href!=_49.href){this.raise_loading_img();}if(!_4c){_4c=this.current_orientation;}this.orientation(_4c);this.div.box.value=this.cfg.text.search_box;this.div.box.blur();var spa=this;window.setTimeout(function(){spa.show_part2(_49,ex,ey,_4c,_4d);},0);},show_part2:function(_4f,ex,ey,_52,_53){this.preview_url(_4f);var pad=5;if(_52.substr(0,1)=="b"){ey-=(this.div.main.offsetHeight+pad);}else{ey+=pad;}if(_52.substr(1,1)=="r"){ex-=this.div.main.offsetWidth;}this.move(ex,ey);this.current_element=_53;this.div.main.style.visibility="visible";},orientation:function(_55,_56){var _57=this.cfg.prefix.bg;switch(_55){case "bl":case "br":this.div.body.style.top=this.cfg.offset.body.bottom+"px";break;case "tl":case "tr":this.div.body.style.top=this.cfg.offset.body.top+"px";break;default:return;break;}_57+="_"+_55;_57+=(_56?"_d.png":".png");if(this.needs_png_fix){this.div.main.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_57+"',sizingMethod='scale')";}else{this.div.main.style.background="url("+_57+")";}this.current_orientation=_55;},highlight:function(_58){this.clear_timer("show");this.orientation(this.current_orientation,_58);},preview_url:function(_59){var url=_59.href;var _5b=_59.target;this.current_url=url;this.div.url_a.href=url;this.div.url_a.target=_5b;this.div.img_a.href=url;this.div.img_a.target=_5b;this.div.url_a.innerHTML=url.replace(/\w+:\/\/(www\.)?/,"");var m=url.match(/\w+:\/\/([^\/]*)/);if(m){this.div.preview.title="Go to "+m[1];this.div.loading_img.title="Go to "+m[1];}else{this.div.preview.title="";this.div.loading_img.title="";}this.clear_timer("retry");if(this.retry_url_list[url]){this.div.preview.src=this.retry_url_list[url];}else{this.div.preview.src=this.cfg.prefix.preview+"preview/?url="+encodeURIComponent(url)+"&key="+this.cfg.key+"&src="+encodeURIComponent(this.cfg.source)+"&cp="+this.campaign("preview")+"&v="+this.cfg.version;}},link_click:function(_5d){switch(_5d){case "down":this.div.url_a.style.color="#ff0000";this.div.preview_div.style.borderColor="#ff0000";break;case "up":case "out":this.div.url_a.style.color="#003399";this.div.preview_div.style.borderColor="#003399";break;case "click":var _5e=this.cfg.prefix.preview+"r/?url="+encodeURIComponent(this.current_url)+"&key="+this.cfg.key+"&src="+encodeURIComponent(this.cfg.source)+"&cp="+this.campaign("redir");this.div.url_a.href=_5e+"&tol=url";this.div.img_a.href=_5e+"&tol=image";break;}},check_image_status:function(ev){this.lower_loading_img();if(this.div.preview.width==274){var _60=1;var url=this.div.preview.src;var _62=/retry=(\d+)/;var _63=url.match(_62);if(_63){_60=Number(_63[1])+1;url=url.replace(_62,"retry="+_60);}else{url+="&retry="+_60;}if(_60>this.cfg.retry_interval.length){return;}if(_60==this.cfg.retry_interval.length){url+="&final=1";}this.retry_url_list[this.div.url_a.href]=url;if(this.div.main.style.visibility=="visible"){var spa=this;var _65=this.cfg.retry_interval[_60-1];this.clear_timer("retry");this.timer_id.retry=window.setTimeout(function(){spa.div.preview.src=url;},_65);}}},form_submit:function(ev){var _67=false;if(this.div.box.value===this.cfg.text.search_box){this.div.form_campaign.value=this.campaign("defaulttext");if(this.cfg.flavor!="wordpress"){_67=true;}}else{if(this.div.box.value===""){this.div.form_campaign.value=this.campaign("emptybox");_67=true;}else{this.div.form_campaign.value=this.campaign("bsb");}}if(_67){var _68=this.cfg.prefix.search+"?source="+encodeURIComponent(this.cfg.source)+"&campaign="+this.div.form_campaign.value;if(this.cfg.search_type=="image"){_68+="&query=sunflower";}window.open(_68,"_blank");ev.returnValue=false;if(ev.preventDefault){ev.preventDefault();}return false;}if(this.div.box.value===this.cfg.text.search_box){this.div.form_campaign.value=this.campaign("defaulttext");}else{this.div.form_campaign.value=this.campaign("bsb");}},needs_png_fix:(navigator.userAgent.match(/msie (5\.5|6)/i)&&navigator.platform=="Win32"),isFirefox:(navigator.userAgent.match(/firefox/i)),yahoo_yui_section_being:function(){"The following section of code adapted from the Yahoo YUI Library";" Copyright (c) 2006, Yahoo! Inc. All rights reserved.";" Code licensed under the BSD License:";" http://developer.yahoo.net/yui/license.txt";" Version: 0.11.4";},isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return [dd.scrollTop,dd.scrollLeft];}else{if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}}},getViewportHeight:function(){var _6e=-1;var _6f=document.compatMode;if((_6f||this.isIE)&&!this.isOpera){switch(_6f){case "CSS1Compat":_6e=document.documentElement.clientHeight;break;default:_6e=document.body.clientHeight;}}else{_6e=self.innerHeight;}return _6e;},getViewportWidth:function(){var _70=-1;var _71=document.compatMode;if(_71||this.isIE){switch(_71){case "CSS1Compat":_70=document.documentElement.clientWidth;break;default:_70=document.body.clientWidth;}}else{_70=self.innerWidth;}return _70;},yahoo_yui_section_end:function(){"End Yahoo YUI Library adapted code section";},log:function(msg,obj){if(!this.isFirefox||typeof console=="undefined"){return;}if(obj){console.log(msg,obj);}else{console.log(msg);}}};var snap_preview_anywhere=new snapPreviewAnywhere();