if(typeof SNAP_COM=="undefined"){SNAP_COM={};}SNAP_COM.snap_shot_obj=function(){var t={};t={div:null,timer_id:null,div_added:null,current_element:null,current_url:null,current_orientation:"lr",init:function(){var i,el;this.div={};this.timer_id={show:null,partial:null};this.div_added=false;this.current_element=null;this.current_url=null;this.domain=null;this.cfg=SNAP_COM.shot_config;this.host=this.get_domain(document.location.href);if(SNAP_COM.window_loaded){this.onload();return;}this.observe(window,"load",this.onload);if(this.cfg.check_defer){el=document.getElementById("snap_preview_anywhere");if(!el||!el.defer){return;}}this.timer_id.partial=this.later(this.cfg.partial_check.delay,this.partial_check);},get_domain:function(_3){var m=_3.match(/^https?:\/\/([^#]*)/);return m?m[2]:"";},later:function(_5,_6){var _7=this;var _8=Array.prototype.slice.apply(arguments,[2]);return this.sto(function(){_6.apply(_7,_8);},_5);},observe:function(_9,_a,_b){var _c=this;var _d=Array.prototype.slice.apply(arguments,[3]);_d.unshift(undefined);var f=function(ev){_d[0]=ev;_b.apply(_c,_d);};if(_9.addEventListener){if(_a=="mousewheel"){_a="DOMMouseScroll";}_9.addEventListener(_a,f,false);}else{if(_9.attachEvent){_9.attachEvent("on"+_a,f);}}},el_prop:function(_10,key,_12){if(!_10.snap_com_shot){_10.snap_com_shot={};}if(_12!==undefined){_10.snap_com_shot[key]=_12;}return _10.snap_com_shot[key];},clear_timer:function(_13){if(this.timer_id[_13]){clearTimeout(this.timer_id[_13]);this.timer_id[_13]=0;}},campaign:function(_14){var m;var id=window.location.host.replace(/:\d+$/,"");if(this.cfg.flavor=="xanga"){m=window.location.pathname.match(/(\/\w+)/);id+=m[1];}var _17="shot_";_17+=_14+"!";if(this.shot_type){_17+=this.shot_type;}_17+="!"+id;return _17;},is_internal_link:function(_18){var m,regexS,regex;var _1a=/^(http|file)s?:\/\/(www\.)?(.*?)\//;if(this.domain===null){m=document.location.href.match(_1a);if(m){this.domain=m[3];}else{this.domain="";}}var _1b=_18.href.match(_1a);if(_1b&&(this.domain==_1b[3])){if(this.cfg.redirect_param){regexS="[\\?&]"+this.cfg.redirect_param+"=([^&#]*)";regex=new RegExp(regexS);if(regex.exec(_18.href)===null){return true;}else{return false;}}else{return true;}}else{return false;}},is_valid_link:function(_1c){var _1d=_1c.href.match(/^(http)s?:\/\/([^#]*)/);var _1e=document.location.href.match(/^(http|file)s?:\/\/([^#]*)/);if(!_1d||!_1e||(_1d[2]==_1e[2])||(_1d[1]!=="http")){return false;}return true;},add_link_icon:function(el){var _20=this.div.link_icon.cloneNode(false);if(!this.needs_png_fix||el.offsetHeight>14){_20.style.verticalAlign="top";}_20.style.position="relative";_20.style.display="inline";_20.style.zIndex=el.style.zIndex;this.el_prop(_20,"activated",true);this.el_prop(_20,"link_icon",true);this.el_prop(_20,"shot_parent",el);if(this.el_prop(el,"markup")&&(el.style.visibility=="hidden"||el.style.display=="none")){el.parentNode.insertBefore(_20,el.nextSibling);}else{el.appendChild(_20);}return _20;},activate:function(el){var _22,trigger,icon;if(this.el_prop(el,"done")){return;}_22=el.childNodes;if(_22.length==1&&_22[0].tagName==="IMG"){this.el_prop(el,"trigger","link");}switch(this.el_prop(el,"trigger")){case "both":trigger=el;this.add_link_icon(el);break;case "icon":trigger=this.add_link_icon(el);break;default:trigger=el;break;}this.el_prop(trigger,"activated",true);if(this.cfg.observe_event=="link"){this.observe(trigger,"mouseover",this.show_delay,this.cfg.delay.show,this.cfg.delay.move);this.observe(trigger,"mouseout",this.hide_delay,this.cfg.delay.hide);}this.el_prop(el,"done",true);},conditional_activate:function(el,_24){if(this.el_prop(el,"done")||!this.is_valid_link(el)){this.el_prop(el,"done",true);return;}if(_24.shot[0]&&el.href.indexOf("https://")==-1&&(this.cfg.show_internal||!this.is_internal_link(el))){this.activate(el);}else{this.el_prop(el,"done",true);}},scan_tree:function(_25,_26){var m,i,len,prop={};if(_25&&_25.tagName){m=_25.className.match(/(snap_\w+)/ig);if(m){len=m.length;for(i=0;i10000){_2c=10000;}_2e+=_2c;this.last_partial_check_count=_2d;}}this.timer_id.partial=this.later(this.cfg.partial_check.delay,this.partial_check);this.cfg.partial_check.attempts--;},onload:function(){this.clear_timer("partial");this.cfg.partial_check.attempts=0;if(!this.div_added){this.add_main_div();}this.shot_scan();},get_all_shot_nodes:function(_2f,_30,_31){var els=_2f.getElementsByTagName("*");for(var i=0;i\n\n\n
\n\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n
\n
\n \n \n
\n
\n
\n
\n";this.get_all_shot_nodes(this.div.main,this.div);this.set_css();this.raise_loading_img();this.observe(this.div.bubble,"mouseover",this.rollover);this.observe(this.div.pointer,"mouseover",this.rollover);this.observe(this.div.bubble,"mouseout",this.rollout);this.observe(this.div.pointer,"mouseout",this.rollout);this.observe(this.div.preview,"load",this.lower_loading_img);this.observe(this.div.option_iframe,"mouseout",function(_3f){_3f.returnValue=false;_3f.cancelBubble=true;});this.observe(this.div.ques_a,"click",this.option_frame,true,false);this.observe(this.div.close_a,"click",this.option_frame,true,true);this.observe(this.div.option_a,"click",this.option_frame,false,false);this.dragFunction=function(ev){shot.dragMove(ev);};this.dragStopFunction=function(ev){shot.dragStop(ev);};this.observe(document,"mousemove",this.dragFunction);this.observe(document,"mouseup",this.dragStopFunction);this.observe(this.div.pin_close_img,"click",function(){shot.unpin();});this.observe(window,"scroll",this.onScroll);this.observe(document,"mousewheel",function(ev){shot.disabled=true;clearTimeout(shot.disableTimer);shot.disableTimer=shot.sto(function(){shot.disabled=false;},200);});this.observe(this.div.search_form,"submit",this.form_submit);this.observe(this.div.box,"focus",function(ev){if(shot.div.box.value===shot.cfg.text.SearchTheWeb){shot.div.box.value="";}});var _44="?source="+encodeURIComponent(this.cfg.source)+"&campaign=";this.div.logo_a.href=this.cfg.href.logo+_44+this.campaign("bsblogo");this.div.cobrand_a.href=this.cfg.href.cobrand;if(this.div.cobrand_a.href.indexOf(this.cfg.prefix.snap)===0){this.div.cobrand_a.href+=_44+this.campaign("link");}this.div.search_form.action=this.cfg.prefix.search;el=document.createElement("input");el.type="hidden";el.name="source";el.value=encodeURIComponent(this.cfg.source);this.div.search_form.appendChild(el);el=document.createElement("input");el.type="hidden";el.name="campaign";el.value="";this.div.search_form.appendChild(el);this.div.form_campaign=el;el=document.createElement("input");el.type="hidden";el.name="spa_key";el.value=encodeURIComponent(this.cfg.key);this.div.search_form.appendChild(el);if(this.cfg.search_type=="adult"){el=document.createElement("input");el.type="hidden";el.name="spa_adult";el.value="1";this.div.search_form.appendChild(el);}this.orientation("bl");},option_frame:function(ev,_46,_47){var url;var _49=this;if(!this.no_opt_menu){this.div.body.style.display=_46?"none":"inline";this.div.options.style.display=_46?"inline":"none";if(_46){url=this.opt_url+"&url="+this.current_url+(_47?"&hl=disable":"")+(this.shot_type?"&shot_type="+this.shot_type:"");this.div.option_iframe.src="about:blank";this.sto(function(){_49.div.option_iframe.src=url;},0);}}ev.returnValue=false;if(ev.preventDefault){ev.preventDefault();}return false;},raise_loading_img:function(){this.div.loading_img.style.zIndex=Number(this.div.preview.style.zIndex)+10;},lower_loading_img:function(){this.div.loading_img.style.zIndex=Number(this.div.preview.style.zIndex)-10;},move:function(x,y){this.div.main.style.left=x+"px";this.div.main.style.top=y+"px";},get_activated_element:function(ev){var i,element;if(ev.srcElement){element=ev.srcElement;}else{if(ev.target){element=ev.target;}}for(var i=0;(i<5)&&element;i++){if(this.el_prop(element,"activated")){return element;}element=element.parentNode;}return null;},hide_delay:function(ev,_4f){if(this.pinned||(ev!==null&&!this.get_activated_element(ev))){return;}this.clear_timer("show");this.timer_id.show=this.later(_4f,this.hide);},hide:function(){this.div.main.style.visibility="hidden";if(this.isSafari){if(this.div.preview){this.later(0,function(){this.div.preview.src="about:blank";});}}else{if(this.div.preview.contentWindow){this.div.preview.contentWindow.location.replace("about:blank");}}},show_delay:function(ev,_51,_52){var _53=null;var _54;var _55=this.get_activated_element(ev);if(this.disabled||!_55){return;}this.clear_timer("show");var ex=this.getPageX(ev);var ey=this.getPageY(ev);var _58=this.getViewportWidth();var _59=this.getViewportHeight();var _5a=ev.clientX;var _5b=ev.clientY;var _5c;if((/Safari|Konqueror|KHTML/gi).test(navigator.userAgent)){var _5a=ev.pageX-window.pageXOffset;var _5b=ev.pageY-window.pageYOffset;}_5c=(_5b>(_59/2))?"b":"t";_5c+=(_5a>(_58/2))?"r":"l";var _5d=this.cfg.css_pos.main.h-30;if(_5b<_5d&&_5c.substr(0,1)==="b"&&(_59-_5b)>(_5d*1/2)){_5c="t"+_5c.substr(1,1);}_53=_55;if(this.el_prop(_55,"link_icon")){_53=this.el_prop(_55,"shot_parent");}if(!this.el_prop(_53,"markup")&&!this.is_valid_link(_53)){return;}if(this.current_element!=_55){_51=_52;}else{if(this.div.main.style.visibility=="visible"){return;}}this.timer_id.show=this.later(_51,this.show,_55,ex,ey,_5c);},show:function(_5e,ex,ey,_61){this.unpin();var _62=this.get_shot_data(_5e);this.div.body.style.display="inline";this.div.options.style.display="none";if(!_61){_61=this.current_orientation;}this.orientation(_61);this.div.box.value=this.cfg.text.SearchTheWeb;this.div.box.blur();this.later(0,this.show_part2,_62,ex,ey,_61,_5e);var _63=this.cfg.prefix.spasense+"spasense.php?key="+this.cfg.key+"&url="+_62.url+"&html="+_62.element.innerHTML.substr(0,500)+"&cp="+this.campaign("spasense")+"&size="+this.cfg.size+"&src="+encodeURIComponent(this.cfg.source);if(this.cfg.search_type=="spasense"&&this.cfg.search_box==true){if(this.div.spasense_iframe.src!=_63){this.div.spasense_iframe.src=_63;}}else{if(this.div.spasense_iframe.src!="about:blank"){this.div.spasense_iframe.src="about:blank";}}},show_part2:function(_64,ex,ey,_67,_68){this.show_shot(_64);if(_67.substr(0,1)=="b"){ey=ey-this.div.main.offsetHeight-5;}else{ey+=10;}if(_67.substr(1,1)=="r"){ex=ex-this.div.main.offsetWidth+20;}else{ex=ex-15;}this.move(ex,ey);this.current_element=_64.element;this.div.main.style.visibility="visible";},orientation:function(_69,_6a){_6a=false;var _6b=this.cfg.prefix.bg;this.div.pointer.style.left=this.cfg.pointer[_69].x+"px";this.div.pointer.style.top=this.cfg.pointer[_69].y+"px";_6b+="_"+_69;_6b+=(_6a?"_d.png":".png");if(this.needs_png_fix){this.div.bg_img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_6b+"',sizingMethod='scale')";}else{this.div.main.style.background="url("+_6b+")";}this.current_orientation=_69;},highlight:function(_6c){this.clear_timer("show");this.orientation(this.current_orientation,_6c);},show_shot:function(_6d){var _6e=0;var _6f=this;var _70=_6d.element.getElementsByTagName("img");for(var i=0;i<_70.length;i++){if(!this.el_prop(_70[i],"link_icon")){_6e=1;break;}}this.current_url=_6d.url;this.shot_type="";var _72=this.cfg.prefix.preview+"shot/?url="+encodeURIComponent(_6d.url)+"&key="+this.cfg.key+"&src="+encodeURIComponent(this.cfg.source)+"&cp="+this.campaign("view")+"&sb="+(this.cfg.search_box?"1":"0")+"&v="+this.cfg.version+"&size="+this.cfg.size+"&lang="+this.cfg.lang+"&po="+(this.cfg.preview_only?"1":"0")+"&rp="+encodeURIComponent(this.cfg.redirect_param)+"&search_type="+this.cfg.search_type+"&act="+_6d.trigger+"&has_img="+_6e+"&w="+this.div.preview.offsetWidth+"&h="+this.div.preview.offsetHeight+"&target="+_6d.target+"&referrer="+encodeURIComponent(location.href)+"&svc="+encodeURIComponent(_6d.svc)+"&tag="+encodeURIComponent(_6d.tag)+"&goto="+encodeURIComponent(this.cfg.text.GoToURL);if(this.isSafari){if(this.div.preview){this.later(0,function(){this.div.preview.src=_72;});this.later(300,this.lower_loading_img);}}else{if(this.div.preview.contentWindow){this.div.preview.contentWindow.location.replace(_72);}}if(document.getElementById("snap_com_shot_preview_type")){var _73=document.getElementById("snap_com_shot_preview_type");_73.parentNode.removeChild(_73);}var _74=document.createElement("script");_74.type="text/javascript";shottype_url=_72.replace("shot/","shottype.php")+"&name=1";_74.src=shottype_url;_74.id="snap_com_shot_preview_type";this.div.main.appendChild(_74);},get_inner_text:function(el,_76){var _77="";if(el.innerText!==undefined){_77=el.innerText;}else{if(el.textContent!==undefined){_77=el.textContent;}}return this.trim(_77).substr(0,_76);},get_shot_data:function(el){var i,j,m,els;var _7a;var key,val;var _7c=[];var _7d={"svc":"","tag":"","url":"","target":"","element":el,"trigger":""};if(this.el_prop(el,"link_icon")){el=this.el_prop(el,"shot_parent");_7d.trigger="icon";}else{_7d.trigger="link";}_7d.trigger=(this.el_prop(el,"trigger")=="both"?"both":"only")+"_"+_7d.trigger;if(el.href!==undefined){_7d.url=el.href;_7d.target=el.target;}if(el.innerText!==undefined){_7d.tag=this.trim(el.innerText).substr(0,500);}else{if(el.textContent!==undefined){_7d.tag=this.trim(el.textContent).substr(0,500);}}if(this.el_prop(el,"markup")){_7c.push(encodeURIComponent(el.className.match(/\bSnap_Shot_.*?\b/g).join("|")));_7a=el.firstChild;while(_7a){if(_7a.tagName){m=_7a.className.match(/\bSnap_Shot_.*?\b/g);if(m){key=encodeURIComponent(m.join("|"));val=encodeURIComponent(this.get_inner_text(_7a,500));_7c.push(key+"="+val);}}_7a=_7a.nextSibling;}_7d.svc=_7c.join("&");}return _7d;},rollover:function(ev){this.highlight(true);},rollout:function(ev){var _80=ev.relatedTarget||ev.toElement;if(_80==null){return;}if(this.isOpera){var top=this.getTop(this.div.main);var _82=this.getLeft(this.div.main);var _83=this.getBottom(this.div.main);var _84=this.getRight(this.div.main);var _85=ev.pageX||(ev.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var _86=ev.pageY||(ev.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var _87=(_85>_82&&_85<_84&&_86>top&&_86<_83);if(_87){return;}}this.highlight(false);this.hide_delay(null,100);},pin:function(){this.pinned=true;this.div.pin_close_img.style.display="";},unpin:function(){this.pinned=false;this.div.pin_close_img.style.display="none";this.hide();},onScroll:function(ev){},dragStart:function(ev){this.pin();var _8a=this;this.drag_state="start";var pos=this.getEventPosition(ev);this.dragStartX=pos.x;this.dragStartY=pos.y;this.scrollX=document.all?document.body.scrollLeft:pageXOffset;this.scrollY=document.all?document.body.scrollTop:pageYOffset;},dragMove:function(ev){if(this.drag_state!="start"){return;}var pos=this.getEventPosition(ev);var x=pos.x;var y=pos.y;x=x-this.dragStartX;y=y-this.dragStartY;var obx=this.div.main.offsetLeft;var oby=this.div.main.offsetTop;var _92=obx-0+x;var _93=oby-0+y;if(_92<0){_92=0;}if(_93<0){_93=0;}this.div.main.style.left=_92;this.div.main.style.top=_93;},dragStop:function(ev){this.drag_state="off";},pointerX:function(_95){return _95.pageX||(_95.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(_96){return _96.pageY||(_96.clientY+(document.documentElement.scrollTop||document.body.scrollTop));},getEventPosition:function(evt){var pos=new Object();pos.x=0;pos.y=0;if(!evt){evt=window.event;}if(typeof (evt.pageX)=="number"){pos.x=evt.pageX;pos.y=evt.pageY;}else{pos.x=evt.clientX;pos.y=evt.clientY;if(!top.opera){if((!window.document.compatMode)||(window.document.compatMode=="BackCompat")){pos.x+=window.document.body.scrollLeft;pos.y+=window.document.body.scrollTop;}else{pos.x+=window.document.documentElement.scrollLeft;pos.y+=window.document.documentElement.scrollTop;}}}return pos;},form_submit:function(ev){var _9a=false;if(this.div.box.value===this.cfg.text.SearchTheWeb){this.div.form_campaign.value=this.campaign("defaulttext");if(this.cfg.search_type!="adult"){_9a=true;}}else{if(this.div.box.value===""){this.div.form_campaign.value=this.campaign("emptybox");_9a=true;}else{this.div.form_campaign.value=this.campaign("bsb");}}if(_9a){var _9b=this.cfg.prefix.search+"?source="+encodeURIComponent(this.cfg.source)+"&campaign="+this.div.form_campaign.value;if(this.cfg.search_type=="image"){_9b+="&query=sunflower";}window.open(_9b,"_blank");ev.returnValue=false;if(ev.preventDefault){ev.preventDefault();}return false;}},sto:function(_9c,_9d){if(this.cfg.flavor=="xanga"){return window.restrictedSetTimeout(_9c,_9d);}else{return window.setTimeout(_9c,_9d);}},needs_png_fix:(navigator.userAgent.match(/msie (5\.5|6)/i)&&navigator.platform=="Win32"),isFirefox:(navigator.userAgent.match(/firefox/i)),isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),isOpera:(navigator.userAgent.match(/Opera/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 _a3=-1;var _a4=document.compatMode;if((_a4||this.isIE)&&!this.isOpera){if(_a4==="CSS1Compat"){_a3=document.documentElement.clientHeight;}else{_a3=document.body.clientHeight;}}else{_a3=self.innerHeight;}return _a3;},getViewportWidth:function(){var _a5=-1;var _a6=document.compatMode;if(_a6||this.isIE){if(_a6==="CSS1Compat"){_a5=document.documentElement.clientWidth;}else{_a5=document.body.clientWidth;}}else{_a5=self.innerWidth;}return _a5;},getWidth:function(_a7){var _a8=parseInt(_a7.offsetWidth);if(_a7==document.body||_a7==document||_a7==window){return window.getWidth();}else{if(_a7){var _a8=parseInt(_a7.offsetWidth);return (_a8==0)?parseInt(_a7.style.width):_a8;}else{return null;}}},getHeight:function(_a9){if(_a9==document.body||_a9==document||_a9==window){return window.getHeight();}else{if(_a9){var _aa=parseInt(_a9.offsetHeight);return (_aa==0)?parseInt(_a9.style.height):_aa;}else{return null;}}},getLeft:function(_ab){return _ab.offsetLeft;},getRight:function(_ac){return this.getLeft(_ac)+this.getWidth(_ac);},getTop:function(_ad){return _ad.offsetTop;},getBottom:function(_ae){return this.getTop(_ae)+this.getHeight(_ae);},trim:function(str){return str.replace(/^\s*|\s*$/g,"");},Rescan:function(_b0){if(_b0===null){return;}this.shot_scan(_b0);}};t.init();return t;};SNAP_COM.shot=SNAP_COM.snap_shot_obj();