// $.can_has({component: cheeseburger});
// $(this).is_a().component();

(function($){
	var _components = {};
	
	$.can_has = function(what) { 
      $.extend(_components, what);
	    return this;
	};
	
	$.fn.is_a = function() {
   	$.extend(this, _components);
      return this;
	};
	
	$.can_has({
      
      /* BEGIN WATERMARKED FORM FIELDS */
      watermark: function(params){
         var	$this = $(this),
	            _getSetText = function(value){
                  var textfunc = ($this.is("input")) ? "val" : "text";
                  if (value != undefined) {
                     $this[textfunc](value);
                     return $this;
                  }
                  else return $this[textfunc]();
               },
               _defaultText = _getSetText();

         $this.focus(function(){ if (_getSetText() == _defaultText) _getSetText("") })
              .blur(function(){ if (_getSetText() == "") _getSetText(_defaultText) })
              
         return $this;
      },
      /* END WATERMARKED FORM FIELDS */
      
		dropdownmenu : function(params){
			if (this.is("ul")){
				this.find("li").hover(
				   function(){
				      $(this).addClass("hover")
							 .children("ul").show().end()
							 .find("a").addClass("hover");
				   },
				   function(){
				      $(this).removeClass("hover")
						     .children("ul").hide().end()
							 .find("a").removeClass("hover");
				   }
				);
			}
			return this;
		},
		lightboxOpener : function(params){
			var $this = this, _href;
			if ($this.is("a") && $this.attr("href")) {
				_href = $this.attr("href");
			    var $overlay = $("div.overlay");
			    if ($overlay.length == 0) {
			 	    $overlay = $("<div class='overlay'></div>");
				    $("body").append($overlay);
				}
			 	var $content;  // This is returned by the AJAX call
				var _method = "GET";
				
				var _showOverlay = function(){
					$overlay.fadeIn({
						duration: 400,
						easing: "easeInExpo",
						complete: function(){
							// FF OSX balks when combining SIFR text set above a layer set with CSS transparency...
							if ($.browser.mozilla) $overlay.css({ "opacity": 1, "background": "url(/Assets/HUG/img/bg/overlaybg.png) top left" });
							else $overlay.css({ "opacity": 0.60 });
							
							$overlay.click(_hideOverlay)
								    .height($(document).height())
								    .width($(document).width() - ($.browser.msie && (parseInt(jQuery.browser.version) < 7)) );	// this is to compensate for IE's scrollbars
							_loadContent();
						}
					});
				} // _showOverlay() END
				
				var _hideOverlay = function(){
					$.each([$content, $overlay], function(){
						this.fadeOut({
							duration: 400,
							easing: "easeOutExpo"
						});
					});
					$content.remove();
				} // _hideOverlay() END
				
				var _loadContent = function() {
					$.ajax({
						type: _method,
						url: _href,
						error: function(XMLHttpRequest, textStatus, errorThrown){
							alert(textStatus);
						},
						success: function(data){
							$content = $(data);
							$("body").append($content);

						    var _setPosition = function(){
    						    var $interstitial = $("div.interstitial");
								var scrollbars = ($.browser.msie && (parseInt(jQuery.browser.version) < 7)) ? 21 : 0 ;	// this is to compensate for IE's scrollbars
							    var docHeight = document.documentElement.clientHeight;
							    var docWidth = document.documentElement.clientWidth;
		                        var proposedY = (docHeight/2)  - ($interstitial.height() /2) + document.documentElement.scrollTop;
		                        var proposedX = (docWidth/2)  - ($interstitial.width() /2);
							    
								$interstitial.css("top", proposedY < 0 ? 0 : proposedY );
							    $interstitial.css("left", proposedX < 0 ? 0 : proposedX );
							    
							    $overlay
    								.height($(document).height())
	    							.width($(document).width() - scrollbars)
							}
							
							$(window).resize(_setPosition);
							
							_setPosition();
							
                            // PNG fixes and SIFR implementation
                            setTimeout(function(){
                                if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100)){
                                    sIFR.replaceElement(
                                       "div.interstitialContent h2.flashreplace", 
                                       named({sFlashSrc: "/Assets/HUG/swf/sifr.swf", sColor: "#ffffff", sWmode: "transparent" })
                                    );
                                    sIFR.replaceElement(
                                       "div.interstitialContent h1.flashreplace", 
                                       named({sFlashSrc: "/Assets/HUG/swf/sifr.swf", sColor: "#004B8D", sWmode: "transparent" })
                                    );
                                }
                                
                                if ($.browser.msie && (parseInt(jQuery.browser.version) < 7)) {
                                    $("img[src*='ashx']").each(function(){;
                                        $this = $(this);
                                        $this.css({
                                            "height": $this.height(),
                                            "width": $this.width(),
                                            "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%1',sizingMethod='crop')".replace("%1", $this.attr("src"))
                                        })
                                        $this.attr("src", "/Assets/HUG/img/transparent.gif")
                                    })
                                }   //PNG Fix for non-.png src
                            }, 250);
                     
							$content.find("div.control.close > a").click(function(){
								_hideOverlay();
								return false;
							})
							$content.fadeIn({duration: 400, easing: "easeInExpo", complete: function(){ _setPosition(); } });
						}	// success() END
					})
				}	// _loadContent() END
				
				$this.click(function(){
						if ($overlay.css("display", "block")) _showOverlay();
						return false;
				});
			}
			return $this;
		},
		selectelement : function(params){
            var $select = this;
            var $container = this.children();
			   var $list = this.find("div.mod_selectBody > ul");
            var $h4 = this.find("div.mod_selectBody > h4");
				
            $h4.click(function(){
                $this = $(this);
                if ($this.hasClass("selected")) { 
                    $this.removeClass("selected");
                    if ($.browser.msie) $select.nextAll().find("h4").css("visibility", "visible");   
                    $list.hide();
                }
                else { 
                    $this.addClass("selected");
                     if ($.browser.msie) $select.nextAll().find("h4").css("visibility", "hidden");
                     $list.show(); 
                }
            });
            $list.find("li").hover(
                function(){ $(this).addClass("hover"); },
                function(){ $(this).removeClass("hover"); }
            );

            $("body").click(function(e) { if (e.target != $h4[0] && $h4.hasClass("selected")) $h4.click(); });

            return this;
		},
		sidenav : function(params){
			var _$selected = this.find("li.selected");
			
         var _close = function($closeElement, $openElement) {
            if ($closeElement.length > 0 ) {
                $closeElement.children("ul").slideUp({ duration: 400, easing: "easeInExpo", complete: function() { 
					    $closeElement.removeClass("selected");
					    if ($openElement) _open($openElement);
				    }})
		    }
		    else if ($openElement) _open($openElement);
         }
         var _open = function($element) {
         	$element.addClass("selected");
            $element.children("ul").slideDown({ duration: 400, easing: "easeOutExpo" });
         }
			if (this.is("ul")){
				this.children("li").click(
					function(e) {
					    if (!$(e.target).is("a")){
						    var $this = $(this);
						    if ($this.hasClass("selected")) {
							    _close($this);
						    }
						    else {
                                _close(_$selected, $this);
                                _$selected = $this;
						    }
						}
					}
				).end().find("li").hover(
					function() { $(this).addClass("hover"); },
					function() { $(this).removeClass("hover"); }
				).find("a").click(
				    function() { window.location = $(this).attr("href"); return false; } 
				);
			}
			return this;
		}
	});
	
	// $.browser.hasFlash(9.0) ? true : false;
   $.extend($.browser, {
   	hasFlash: function(ver){
			var version = (ver) ? ver : 1, detected = false, flash;
   		if (navigator.plugins && navigator.plugins.length) {
   			flash = "Shockwave Flash";
				// version check here can be better, but we really just want to check for major versions and point releases
   			if (navigator.plugins[flash] && Number($.trim(navigator.plugins[flash].description.split(flash)[1].split("r")[0])) >= ver)
					detected = true;
   		}
   		else 
   			if (ActiveXObject) {
   				flash = "ShockwaveFlash.ShockwaveFlash";
   				try { if (new ActiveXObject(flash)[version]) detected = true; } 
   				catch (e) {  }
   			}
   			else 
   				if (navigator.mimeTypes && navigator.mimeTypes.length) {
   					flash = "application/x-shockwave-flash";
   					if (navigator.mimeTypes[flash] && navigator.mimeTypes[flash].enabledPlugin) detected = true;
   				}
   		return detected;
   	},
      setCookie: function(params) {
         var name = params.name;
         var value = params.value;
         var expiresDate = new Date();
         expiresDate.setTime(expiresDate.getTime() + (params.expires * 86400000))	// (milliseconds in a day)
         
         document.cookie = ("%1=%2;expires=%3;path=/").replace("%1", name)
                                                      .replace("%2", value)
                                                      .replace("%3", expiresDate.toUTCString());
         return $.browser.getCookie(name);
      },
      getCookie : function(name) {
         var namepos = document.cookie.split(name + "=")[1]
         if (namepos) {
            return namepos.split(";")[0]
         }
         else return false;
      }
   });
	
	$.can_has({
		flashcontainer : function(params) {
			
		}
	})
})(jQuery);



jQuery.extend( jQuery.easing, {
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	}
});

/* // end plugin defs // */

ICON = { 
    FOR_VETS_LOC:  "/for_vets.aspx",
    FOR_VETS_INTERSTITIAL : "/layovers/vetcheck.aspx",

	init: function() {
	   // top nav
	   $("div.header > ul.navigation").is_a().dropdownmenu();
	   $("div.header > ul.navigation li.selected h3 a").addClass("selected");
	   
	   // top search watermark
	   $(".header .siteSearch input[value='Search']").each(function(){
	      $(this).is_a().watermark()
            .parent().click(function(){ $(this).children("input").focus() });
      });
      $(".header .siteSearch input[type='image']").click(function(e){
         var $this = $(this),
             $form = $this.parent(),
             $input = $form.find("input[type='text']");
         if ($input.val() == "Search") $input.val("");
         if($form.length){
            $form.submit();
            e.preventDefault();
            e.stopPropagation();
         }
      });
      
      
      // Error page back link functionality
      $("div.pageError a[rel='Prev']").click(function(e){ history.go(-2); e.preventDefault(); });
      
	   $(".searchresults .siteSearch input[value='Search']").is_a().watermark();

	   // this initializes the sidenav
	   $("ul.navElement").is_a().sidenav();
	   
	   // select lists
	   $("div.mod_select").each(function(){
	      $(this).is_a().selectelement();
	   });
	   
	   // make full product detail tout blocks clickable
	   $("div.mod_product").click(function(){
	      $(this).find("a").click();
	   });
	   
		// tabbed block
		$("div.mod_tabbed").find("li.tab > h4").click(function(){
            $(this).parent().siblings().removeClass("selected")
                                       .find("h4").removeClass("selected").end().end()
                            .addClass("selected").end()
                   .addClass("selected");
        });
		
	   // Checks "For Vets" cookie
	   if (!$.browser.getCookie("isVet")) {
	      $("div.header > ul.navigation > li.vets > h3 > a").addClass("lightboxOpener").attr("href", ICON.FOR_VETS_INTERSTITIAL);
	   }
	   else {
          $("div.header > ul.navigation > li.vets > h3 > a").attr("href", ICON.FOR_VETS_LOC);
	   }
	   
	   // Checks links for lightbox
		$("a.lightboxOpener, a.videolink").each(function(){
			$(this).is_a().lightboxOpener();
		});
		
		// Rollover for buttons
        $("img, input").each(function(){
	        var	$this = $(this),
			        originalsrc = $this.attr("src");
        			
	        if (originalsrc && (originalsrc.indexOf("_off.") > -1)) {
		        var on_src = originalsrc.replace("_off.", "_on.");
		        $("<img src='%1'/>".replace("%1", on_src));	// preload
        		
		        $this.hover(
			        function(){ $this.attr("src", on_src) },
			        function(){ $this.attr("src", originalsrc) }
		        );
	        }
        });
        
      //PNG Fix for non-.png src

        if ($.browser.msie && (parseInt(jQuery.browser.version) < 7)) {
            $("img[src*='.ashx']").each(function(){
                $this = $(this);
                $this.css({
                    "height": $this.height(),
                    "width": $this.width(),
                    "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%1',sizingMethod='crop')".replace("%1", $this.attr("src"))
                })
                $this.attr("src", "/Assets/HUG/img/transparent.gif");
            });
			
			// swaps background-image in CSS for .tout_bg image element, to unlock anchor tags
			// needs the timeout so the pngfix can run
			/**/
			setTimeout(function(){
				$("div.mod_tout").each(function(){
				    var $this = $(this),
				        $type = $this.find("div.type");
				    if ($type.length > 0) {
				        var _class = $type.attr("class"),
				            _line = _class.match(/\bhug_\w+\b/),
				            _function = arguments.callee;
				    
				        if (_line != null && !$type.hasClass("long")) {
				            var bgimage = "<img src='%1' width='204' height='169' class='tout_bg' style='%2'/>",
				                source = $type.css("filter").match(/src=("|')(\S+)("|'),/)[2].replace("_wide.", ".");
				             bgimage.replace(/%2/, "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%1',sizingMethod='crop')".replace(/%1/, source));
				            $type.prepend(bgimage.replace(/%1/, source));
				            $type.css("filter","").removeClass(_line);
				        }
				    }
				});
			}, 2000);
			/**/
        }   
	},
	init_forVetsInterstitial: function() {
	   $fieldsets = $("div.forvetsonly fieldset");
	   
	   $controls = $fieldsets.find("div.control > img");
	   $yes = $controls.filter( function(){ return $(this).attr("alt") == "Yes" } );
	   $no = $controls.filter( function(){ return $(this).attr("alt") == "No" } );
	   $submit = $controls.filter( function(){ return $(this).attr("alt") == "Submit" } );
	   
	   $no.click( function(){ $("div.overlay").click(); } );
	   $yes.click( function() { $fieldsets.eq(0).fadeOut({
		      duration: 300, 
		      easing: "easeOutExpo", 
		      complete: function(){
		         $fieldsets.eq(1).fadeIn({ duration: 300, easing: "easeInExpo" })
		      }
	   	   })
		});
		
		var valid = function() {
			var invalid = false,
		        vettype = $(".vettype input").val(),
		        state = $(".state select").val(),
		        number = $(".licensenum input").val(),
				$thispage = $fieldsets.eq(1);
		    
			$thispage.find("p.error").remove();
			$thispage.find("span.required").css("color","");
			     
		     if (state == "") {
		        $thispage.find("div.state span.required").css("color","red");
		        invalid = true;
		     }   
		     if ((vettype == "")) {
		        $thispage.find(".vettype span.required").css("color", "red");
		        invalid = true;
		     }
		     if ((number == "") || (number == "###")) {
		        $thispage.find(".licensenum span.required").css("color", "red");
		        invalid = true;
		     }
		     
		     if (invalid) {
		        $thispage.prepend("<p class='error'>All fields are required.<br/>Please enter/select your profession, state and license number.</p>");
		        return false;
		     }
		     else return true;
		    
		}
		
		$submit.click( function() { 
		    if (!valid()) return;
			$.browser.setCookie({ name: "isVet", value: "true", expires: 360 });
			window.location = ICON.FOR_VETS_LOC; 
		})
	}
}


/* // onload handlers // */
$("document").ready(function(){
	ICON.init();
});




/*	sIFR v2.0.5
	Copyright 2004 - 2007 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.
	
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100)){
	sIFR.setup();
    sIFR.replaceElement(
       ".landing .colhead h1.flashreplace, .productdetail h2.flashreplace, div.modselectHeader h3.flashreplace, .productfinder h3.flashreplace",
        named({sFlashSrc: "/Assets/HUG/swf/sifr.swf", sColor: "#ffffff", sWmode: "transparent" })
     );
    sIFR.replaceElement(
       "div.mod_qaBlockBody h3.flashreplace, div.onecolcontainer_long h3.flashreplace, .productfinder h2.flashreplace, div.diagnose h3.flashreplace",
       named({sFlashSrc: "/Assets/HUG/swf/sifr.swf", sColor: "#555555", sWmode: "transparent" })
    );
    sIFR.replaceElement(
       "h1.flashreplace, .searchresults .colhead h2.flashreplace", 
       named({sFlashSrc: "/Assets/HUG/swf/sifr.swf", sColor: "#004B8D", sWmode: "transparent" })
    );
};