
/*********************
//* http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
*********************/
//Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
var arrowimages={down:['', ''], right:['', '']}

var jqueryslidemenu={

	animateduration: {over: 200, out: 25}, //duration of slide in/ out animation, in milliseconds

	buildmenu:function(menuid, arrowsvar){
		jQuery(document).ready(function($){
			$(" #main_navigation a").removeAttr("title");

			var $mainmenu=$("#"+menuid+">ul")
			var $headers=$mainmenu.find("ul").parent()
			$headers.each(function(i){
				var $curobj=$(this)
				var $subul=$(this).find('ul:eq(0)')
				this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
				this.istopheader=$curobj.parents("ul").length==1? true : false
				$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
				
				$curobj.hover(
					function(e){
						var $targetul=$(this).children("ul:eq(0)")
						this._offsets={left:$(this).offset().left, top:$(this).offset().top}
						
						if(jQuery.browser.msie){
							var menuleft=this.istopheader? 0 : this._dimensions.w +2
							menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) -4 : menuleft
						}
						if(!jQuery.browser.msie){
							var menuleft=this.istopheader? 0 : this._dimensions.w
							menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
						}
						if ($targetul.queue().length<=1) //if 1 or less queued animations
							$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
					},
					function(e){
						var $targetul=$(this).children("ul:eq(0)")
						$targetul.slideUp(jqueryslidemenu.animateduration.out)
					}
				) //end hover
				$curobj.click(function(){
					$(this).children("ul:eq(0)").hide()
				})
			}) //end $headers.each()
			$mainmenu.find("ul").css({display:'none', visibility:'visible'});
			searchFocus($);
		}) //end document.ready
	}
}
//build menu with ID="main_navigation" on page:
jqueryslidemenu.buildmenu("main_navigation", arrowimages)

jQuery(document).ready(function($){
	$('#search-block-form .form-item input').val('search');
})

function searchFocus($){
	$('#search-block-form .form-item input').focus(function() {
	  this.value = '';
	  $('#search-block-form .form-item input').animate({
		width: '175px',
		color: '#333'
		}, 300, function() {
		//animation complete
		});
	});	
	$("#search-block-form .form-item input").focusout(function() {
		if(this.value == ''){
			this.value = 'search';
		}	  
	  $('#search-block-form .form-item input').animate({
		width: '100px',
		color: '#c7c8c9'
	  }, 300, function() {
		//animation complete
	  });
	});
};
try{Typekit.load();}catch(e){}

jQuery(document).ready(function($) {
    $("#accordion").accordion({
		active: false,
		autoHeight: false,
		event: 'mousedown',
		header: 'h3',
		collapsible: true
	});	
});
jQuery(window).load(function () {
	/*
	jQuery('#views_slideshow_cycle_div_home_slideshow-block_0').attr('style').change(function() {
		alert('Handler for .change() called.');
	});
	*/	
});;
try{Typekit.load();}catch(e){}

jQuery(document).ready(function($) {
	$(".tab_content").hide(); 								//Hide all content
	$("ul.tabs li:first").addClass("active").show(); 		//Activate first tab
	$(".tab_content:first").show(); 						//Show first tab content
	
	$("ul.tabs li").mousedown(function() {
		$("ul.tabs li").removeClass("active"); 				//Remove any "active" class
		$(this).addClass("active"); 						//Add "active" class to selected tab
		$(".tab_content").hide(); 							//Hide all tab content
		var activeTab = '#' + $(this).find("a").attr("id"); //Find the rel attribute value to identify the active tab + content
		activeTab += '_content';
		$(activeTab).fadeIn(); 								//Fade in the active content
		return false;
	});	
	
	productRequestForm();
	generalRequestForm();
	replaceText();
	fixCareerUpload();
	sideNavSignUp();
	productsHomeDisclaimer();
	topOfPage();
});
function topOfPage(){
	jQuery("div.arrow-up").click(function(){
		 jQuery('html, body').animate({ scrollTop: 0 }, 'slow');
	});	
}
function productsHomeDisclaimer(){
	var sSite = window.location;
	sSite = sSite + ' ';
	if(sSite.indexOf('/products') != -1){
		jQuery("div#block-system-main div.content:contains('*')").append('<div id="productsDisclaimer">*FDA-Cleared</div>');
	}
}
function sideNavSignUp(){
	var sSite = window.location;
	sSite = sSite + ' ';
	if(sSite.indexOf('/investors/') == -1){
		jQuery("#sideNavLinks").append('<div id="sideBannerAd"><a href="/contact"><img src="/sites/nanosphere.us/files/sideBannerNews.png" /></a></div>');
		
		/*
		var aa = '';
		jQuery.each(jQuery.browser, function(i, val) {
		  aa += i + " : <span>" + val + "</span>" + "<br />";
		});		
		jQuery("#sideNavLinks").append('<div id="debug"><br />' + aa + '</div>');
		*/
	}
}
function replaceText(){
	jQuery("body *").replaceText( /C. difficile/gi, italic );
	jQuery("body *").replaceText( /CYP2C19/gi, italic );
	jQuery("body *").replaceText( /F5\/F2\/MTHFR/gi, italic );
	jQuery("body *").replaceText( / SP/g, italic );
}
function italic( str ){
	return "<em>" + str + "<\/em>";
};
function productRequestForm(){
	var checkForm = jQuery('input#edit-submitted-product-interest-product-interest-field').val();
		
	if(typeof checkForm != "undefined"){
		var productName = jQuery('h1#bigTitle').html();
		jQuery('input#edit-submitted-product-interest-product-interest-field').val(productName);
	}
}
function generalRequestForm(){
	var checkForm = jQuery('input#edit-submitted-interest-interest-field').val();
	var queryString = getQueryVariable('interest');
	if(typeof checkForm != "undefined" && queryString != 999){
		jQuery('input#edit-submitted-interest-interest-field').val(unescape(queryString));
	}
}
function fixCareerUpload(){
	jQuery('input.form-file').attr('size','1');
}
function getQueryVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		if (pair[0] == variable) {
			return pair[1];
		}
  	}
	return "999";
};
jQuery(document).ready(function($) {

  litHover($);
  litClick($);
});

function litHover($){
  $(".literature li").hover(
    function (event) {
      $(this).addClass("hover");
      $("li").removeClass("clicked");
      
    },
    function () {
      $(this).removeClass("hover");
      $("li").removeClass("clicked");
    }
  );  
}
function litClick($){    
  $(".literature li").click(function(event) {
      $(this).closest("li").find(".group-full").slideToggle('fast',function(){});
      $("li").removeClass("clicked");
      $(this).closest("li").addClass("clicked");
  }); 
};
try{Typekit.load();}catch(e){}

jQuery(document).ready(function($) {
	var divWidth;
	var divHeight;
	$("#tagMenu").css("display","block");
	divWidth =  $("#tagMenu ul").width();
	divHeight =  $("#tagMenu ul").height();
	$("#tagMenu").css("width",divWidth);
	$("#tagMenu").css("height",divHeight);
	$("#tagMenu").css("display","none");
	
	$("#tagMenuYah").hover(
	  function () {
		$("#tagMenu").slideDown(200);
	  }, 
	  function () {
		$("#tagMenu").slideUp(100);
	  }
	);	
});
;
try{Typekit.load();}catch(e){}

var heightSummary;
var heightHeadline;
var heightTotalCompressed;
var heightCompressedPadding = 40;

jQuery(document).ready(function($) {
	blogHomeLiHover($);
	blogHomeLiClick($);
	tagNavigationHover($);
});
/* */
jQuery(window).load(function ($) {
    //setLiHeight($);
});


function setLiHeight($){
	jQuery('#blogHome ul li').each(function(index) {
		
		heightSummary = jQuery(this).closest("li").find('.field-name-body').height();
		heightHeadline = jQuery(this).closest("li").find('h2').height();
		heightTotalCompressed = heightSummary + heightHeadline + window.heightCompressedPadding;
		
		jQuery(this).closest("li").animate({"height": heightTotalCompressed}, "fast");
		
		jQuery(this).closest("li").find('.expand').css("marginTop",heightTotalCompressed - (heightHeadline + 72));
		
		jQuery(this).closest("li").find('.expand').fadeIn();
		
		/*
		if(jQuery(this).find('.field-name-field-teaser-image').html().length != null){
			jQuery(this).find('.field-name-field-teaser-image').css('display','none');
			jQuery(this).find('.expand').css('display','none');
		}
		*/
	});	
}

function blogHomeLiHover($){
	$("#blogHome ul li").hover(
	  function (event) {
		$(this).addClass("hover");
		var thisIndex = $(this).index(); 
		$('#blogHome ul li').each(function(index) {
			if(thisIndex != index){
				//$(this).fadeTo('fast', 0.5, function() {/*Animation complete.*/});
			}else{
				//$(this).fadeTo('fast', 1.0, function() {/*Animation complete.*/});
			}			
		});	
	  },
	  function () {
		$(this).removeClass("hover");
	  }
	);	
	$('#blogHome ul').mouseleave(function() {
		//$('#blogHome ul li').fadeTo('fast', 1.0, function() {/*Animation complete.*/});
	});
}
function blogHomeLiClick($){	
	$("#blogHome ul li .expand").click(function(event) {
	
		heightSummary = $(this).closest("li").find('.field-name-body').height();
		heightHeadline = $(this).closest("li").find('h2').height();
		heightTotalCompressed = heightSummary + heightHeadline + window.heightCompressedPadding;
		
		//blog_expand_arrow_wht_up.png
		
		var currentHeight = $(this).closest("li").height();

		if(currentHeight > heightTotalCompressed){
			//CLOSE
			$(this).closest("li").animate({"height": heightTotalCompressed}, "fast");
			$(this).closest("li").find('.expand').animate({"marginTop": heightTotalCompressed-(heightHeadline + 72)}, "fast");
		}else{
			//OPEN
			$(this).closest("li").css('height','auto');
			heightFull = $(this).closest("li").height();
			heightFull += 30;
			$(this).closest("li").animate({"height": heightFull}, "fast");
			$(this).closest("li").find('.expand').animate({"marginTop": heightFull-(heightHeadline + 72)}, "fast");
			
			//reset all but the one we're on to the compressed height
			var thisIndex = $(this).index(); 
			$('#blogHome ul li').each(function(index) {
				if(thisIndex != index){
					heightSummary = $(this).closest("li").find('.field-name-body').height();
					heightHeadline = $(this).closest("li").find('h2').height();
					heightTotalCompressed = heightSummary + heightHeadline + window.heightCompressedPadding;
					
					$(this).css('height',heightTotalCompressed);
				}				
			});		
		}
	});	
}
function tagNavigationHover($){
	$('#tagNavigation').mouseenter(function() {
		$(this).addClass("hover");
	});
	$('#tagNavigation').mouseleave(function() {
		$(this).removeClass("hover");
	});
}
;

//videoLightbox('vimeo','29058798',850,270,'#various3')

function videoLightbox(source,vidId,vidWidth,vidHeight,linkId){
	var vidClip;
		if(jQuery.browser.mobile == true){
			vidClip = 'http://vimeo.com/m/' + vidId;
		}else{
			vidClip = 'http://vimeo.com/moogaloop.swf?clip_id=' + vidId;
		}		
		

	jQuery(linkId).fancybox({
		'padding'		: 0,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'width'			: '100%',
		'height'		: vidHeight,
		'href'			: vidClip,
		'type'			: 'iframe'
	});	
	return false;
}	;
/*
 * FancyBox - jQuery Plugin
 * Simple and fancy lightbox alternative
 *
 * Examples and documentation at: http://fancybox.net
 * 
 * Copyright (c) 2008 - 2010 Janis Skarnelis
 * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
 * 
 * Version: 1.3.4 (11/11/2010)
 * Requires: jQuery v1.3+
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);;
/**
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.cookie = function (key, value, options) {

    // key and at least value given, set cookie...
    if (arguments.length > 1 && String(value) !== "[object Object]") {
        options = jQuery.extend({}, options);

        if (value === null || value === undefined) {
            options.expires = -1;
        }

        if (typeof options.expires === 'number') {
            var days = options.expires, t = options.expires = new Date();
            t.setDate(t.getDate() + days);
        }

        value = String(value);

        return (document.cookie = [
            encodeURIComponent(key), '=',
            options.raw ? value : encodeURIComponent(value),
            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
            options.path ? '; path=' + options.path : '',
            options.domain ? '; domain=' + options.domain : '',
            options.secure ? '; secure' : ''
        ].join(''));
    }

    // key and possibly options given, get cookie...
    options = value || {};
    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
;
var sSite;
sSite = window.location;
sSite = sSite + ' ';
sSite = sSite.replace(/^\s+|\s+$/g, '');
sSite = sSite.toLowerCase();

jQuery(function (){
	techSupportDisclaimer();
});
function techSupportDisclaimer(){
	if(window.sSite.indexOf('/technical-support') != -1 && jQuery('body.not-logged-in').css('display') != 'block'){
		if(jQuery.cookie('nanosphere_acceptTerms') == 'true'){
			jQuery(".region-content").append('<div><a href="javascript:void(0);" onMouseDown="clearCookie();" style="color:#fff;">Clear</a></div>');
			jQuery(".region-content").prepend('<div style="width:100%;text-align:right;font-size:14px;line-height:14px;"><img class="file-icon" alt="" title="application-pdf-unavailable" src="/modules/file/icons/application-pdf-unavailable.png"> Document not yet available</div>');
		}else{
			var htmlStr = '<h2>Terms of Use</h2>The following pages may contain product information in the form of Package Inserts. While Nanosphere will strive to keep the product information presented here as current as possible, posting of new versions of product information may occasionally be delayed, therefore, please treat all Package Inserts on this web site as for informational use only. When performing tests, please refer to the Package Insert shipped with the product. By continuing past this page, you agree to abide by these terms.'
				htmlStr += '<br />[ <a href="javascript:void(0);" onMouseDown="disagree();">Back</a> ] [ <a href="javascript:void(0);" onMouseDown="agree();">Agree and Continue</a> ]';	
			jQuery(".region-content").append('<div id="termsAndConditions">' + htmlStr + '</div>');
			//jQuery(".region-content").append('<div>Cookie: ' + jQuery.cookie('nanosphere_acceptTerms') + '</div>');	
			jQuery('#accordion').css("display","none");			
		}
	}
}
function agree(){
	jQuery.cookie('nanosphere_acceptTerms', 'true');
	jQuery('#termsAndConditions').css("display","none");
	jQuery('#accordion').css("display","block");
}
function disagree(){
	jQuery.cookie('nanosphere_acceptTerms', null);
	window.location = "/";
}
function clearCookie(){
	jQuery.cookie('nanosphere_acceptTerms', null);
};
/**
 * jQuery Browser
 *
 * Description:   Get some information about the current used browser,
 *                its operating system and its available plugins.
 * Version:       10.12.02 (based on original jquery.browser)
 * Date:          2010-12-02
 * Copyright:     (c) 2010 Michael Keck
 *                http://www.michaelkeck.de/
 *				  http://plugins.jquery.com/project/advbrowsercheck
 * License:       Dual licensed under the MIT or GPL Version 2 licenses.
 */
(function($) {

    if (typeof($.browser) === 'undefined' || !$.browser) {
        var browser = {};
        $.extend(browser);
    }

    /**
     * Check the current used useragent and return its informations
     * @return $.browser
     */
    $.browserTest = function (a, z) {
        /* Plugins to Check */
        var l = {
                flash:        { activex: 'ShockwaveFlash.ShockwaveFlash', plugin: /flash/gim },
                java:         { activex: navigator.javaEnabled(),         plugin: /java/gim },
                pdf:          { activex: 'PDF.PdfCtrl',                   plugin: /adobe\s?acrobat/gim },
                quicktime:    { activex: 'QuickTime.QuickTime',           plugin: /quicktime/gim },
                realplayer:   { activex: 'RealPlayer',                    plugin: /realplayer/gim },
                silverlight:  { activex: ['AgControl.AgControl'],         plugin: /silverlight/gim },
                shockwave:    { activex: 'SWCtl.SWCtl',                   plugin: /shockwave/gim  },
                windowsmedia: { activex: 'WMPlayer.OCX',                  plugin: /(windows\smedia)|(Microsoft)/gim }
                /**
                 * You can add more plugins to check.
                 * Example:
                 *     nameoftheplugin : { activex: MixedSearch, plugin: MixedSearch }
                 * Info:
                 *     activex    searches after Microsoft ActiveX in Ineternet Explorer
                 *     plugin     seraches after a Plugin in other browsers, like Gecko, WebKit, Khtml, Opera ...
                 */
            };

        /* Default Vars */
        var u = 'unknown', ua = (navigator.userAgent || navigator.vendor || window.opera), x = 'X';

        /* Check Plugins */
        var p = function(p) {
                if (window.ActiveXObject) {
                    try {
                        new ActiveXObject(l[p].activex);
                        $.browser[p] = true;
                    } catch(e) {
                        $.browser[p] = false;
                    }
                } else {
                    $.each(navigator.plugins, function() {
                        if (this.name.match(l[p].plugin)) {
                            $.browser[p] = true;
                            return false;
                        } else {
                            $.browser[p] = false;
                        }
                    });
                }
            };

        /* Search and Replace */
        var m = function (r, h) {
                for (var i = 0; i < h.length; i = i + 1) {
                    r = r.replace(h[i][0], h[i][1]);
                }
                return r;
            };

        /* Get name, version and className of the current used Browser */
        var c = function (i, a, b, c) {
                var r = {
                    name: m((a.exec(i) || [u, u])[1], b)
                }, t = '';
                r[r.name] = true;
                r.version = (c.exec(i) || [x, x, x, x])[3];

                if (r.name.match(/safari/) && r.version > 400) {
                    r.version = '2.0';
                }
                if (r.name === 'presto') {
                    r.version = ($.browser.version > 9.27) ? 'futhark' : 'linear_b';
                }
                t = r.version;
                if (r.version.indexOf('.') !== -1) {
                    t = r.version.split('.');
                    if (t.length < 1) {
                        t = r.version + '.0';
                    } else {
                        t = t[0] + '.' + t[1];
                    }
                }
                r.version = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
                r.cssname = r.name + r.version;
                r.version = parseFloat(t, 10) || 0;
                return r;
            };

        /* Pregmatch the name of the browser */
        a = (a.match(/Opera|Navigator|Minefield|KHTML|Chrome/)
                ? m(a, [[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''], ['Chrome Safari', 'Chrome'], ['KHTML', 'Konqueror'], ['Minefield', 'Firefox'], ['Navigator', 'Netscape']])
                : a
            ).toLowerCase();

        /* Store the name, version and classname of the browser in $.browser */
		$.browser = $.extend(
            (!z) ? $.browser : {}, c(a,
                /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/,
                [],
                /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/
            )
        );

        /* Store the render-engine of the browser in $.layout */
		$.layout = c(a,
            /(gecko|konqueror|msie|opera|webkit)/,
            [['konqueror', 'khtml'], ['msie', 'trident'], ['opera', 'presto']],
            /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/
        );

        /* Store the operating system in $.os */
		$.os = { name: (/(win|mac|linux|sunos|solaris|iphone|ipad|ipod)/.exec(navigator.platform.toLowerCase()) || [u])[0].replace('sunos', 'solaris') };

        /**
         * Check if the browser has a touchscreen and can support it
         */
        $.browser.hastouch = ('ontouchstart' in window) ? true : false;

        /**
         * Check if device is an iThing device or browser is
         * running on an iThing.
         * $.browser.ithing = true, if its an iPad, iPhone or iPod
         */
        $.browser.ithing = (!!(navigator.userAgent.match(/iPad/i) !== null || navigator.userAgent.match(/iPhone/i) !== null || navigator.userAgent.match(/iPod/i) !== null) || $.os.name == 'ipad' || $.os.name == 'iphone' || $.os.name == 'ipod') ? true : false;

        /**
         * Check if device is a mobile device or browser is
         * running on a mobile device.
         * Note: if $.browser.ithing == true  then  $.browser.mobile = true
         */
        $.browser.mobile = (/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(ua.substr(0,4)) || $.browser.ithing);

        /**
         * Check if we have on a mobile device with a touch screen
         * Note: if $.browser.ithing == true
         *       or $.browser.hastouch == true
         *       then $.browser.touch = true
         */
        $.browser.touch = (($.browser.mobile && ($.browser.hastouch || $.browser.ithing)) ? true : false);

        /**
         * Get the absolute url of the current
         * window.location.href object or an
         * optional given path
         * and store it in $.browser.hostpath
         * @param  {string} p  [optional pathname]
         * @return {string} absolute url
         */
        $.browser.realpath = function(p) {
            var a = [], b = [], r = window.location.href, t = '', x = 0;
            if (p) {
                t = (p + '').replace('\\', '/');
                if (t.indexOf('://') !== -1) {
                    x = 1;
                }
                if (!x) {
                    t = r.substring(0, r.lastIndexOf('/') + 1) + t;
                }
            } else {
                t = r.substring(0, r.lastIndexOf('/') + 1);
            }
            a = t.split('/');
            for (var k in a) {
                if (a[k] == '.') {
                    continue;
                }
                if (a[k] == '..') {
                    if (b.length > 3) {
                        b.pop();
                    }
                }
                else {
                    if ((b.length < 2) || (a[k] !== '')) {
                        b.push(a[k]);
                    }
                }
            }
            if (p) {
                return b.join('/');
            }
            $.browser.hostpath = b.join('/');
        };


        /**
         * Get the base filename of the current window.location.href object
         * and store it in $.browser.basename.
         */
        $.browser.basename = (function() {
            var r = window.location.href;
            r = r.substring(r.lastIndexOf('/') + 1, r.length);
            $.browser.filename = r;
            if (r.lastIndexOf('?') !== -1) {
                r = r.substring(0, r.lastIndexOf('?'));
            } else if (r.lastIndexOf('#') !== -1) {
                r = r.substring(0, r.lastIndexOf('#'));
            }
            return r;
        })();


        /**
         * This function extracts all required informations
         * from a file.
         * Example:
         *     // your document.location.href would return
         *     // http://www.domain.com/page/media/fotos/index.html
         *     var fileinfo = $.browser.fileinfo('media/fotos/myfoto.jpg');
         *     // would be
         *     fileinfo = {
         *         basename : 'myfoto.jpg',
         *         dirname  : '/media/fotos',
         *         filename : 'myfoto',
         *         filetype : 'jpg',
         *         filelink : 'http://www.domain.com/page/media/fotos/myfoto.jpg'
         *         realpath : '/page/media/fotos'
         *     };
         * @param {string} file to check
         */
        $.browser.fileinfo = function(f) {
            var r = { 'basename': null, 'dirname' : null, 'filename': null, 'filetype': null, 'filelink': null, 'pathlink': null, 'realpath': null }, p = $.browser.hostpath, h = $.browser.hostaddr;
            if (!f) {
                f = window.location.href;
            }
            r.basename = f;
            if (f.indexOf('/') !== -1) {
                r.basename = f.substring(f.lastIndexOf('/') + 1, f.length);
            }
            r.filename = r.basename;
            if (r.basename.indexOf('.') !== -1) {
                r.filetype = r.basename.substring(r.basename.lastIndexOf('.') + 1, r.basename.length);
                r.filename = r.basename.substring(0, r.filename.length - r.filetype.length -1);
            }
            r.filelink = $.browser.realpath(f);
            r.pathlink = r.filelink.substring(0, r.filelink.lastIndexOf('/'));
            r.dirname  = r.pathlink.replace(p, '').substring(0, r.pathlink.lastIndexOf('/'));
            r.realpath = r.pathlink.replace(h, '').substring(0, r.pathlink.lastIndexOf('/'));
            if (r.dirname.substring(0, 1) !== '/') {
                r.dirname = '/' + r.dirname;
            }
            if (r.realpath.substring(0, 1) !== '/') {
                r.realpath = '/' + r.realpath;
            }
            return r;
        };


        /**
         * Checking, if the browser support some CSS3-definitions
         */
        $.browser.css3 = (function(e) {
            e = e || document.documentElement;
            var c = {
                'borderRadius' : 'border-radius',
                'borderImage'  : 'border-image',
                'boxShadow'    : 'box-shadow',
                'opacity'      : 'opacity',
                'overflowX'    : 'overflow-x',
                'overflowY'    : 'overflow-y',
                'textShadow'   : 'text-shadow'
            };
            var f = false, r = [], s = e.style, m = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms'];
            for (var p in c) {
                var n = p, a = false;
                /* test standard property first */
                if (typeof(s[p]) == 'string') {
                    r[n] = [c[n].toLowerCase()];
                    f = true;
                    a = true;
                }
                /* test vendor specific properties */
                else {
                    /* capitalize */
                    p = p.charAt(0).toUpperCase() + p.slice(1);
                    for (var i = 0, l = m.length; i < l; i++) {
                        var t = m[i] + p;
                        if (typeof(s[t]) == 'string') {
                            r[n] = ['-' + m[i].toLowerCase() + '-' + c[n].toLowerCase()];
                            f = true;
                            a = true;
                        }
                    }
                }
                if (a !== true) {
                    r[n] = false;
                }
            }
            if (f) {
                return r;
            } else {
                return false;
            }
        })();


        /* Check browsers HTML5-support */
        $.browser.html5 = (typeof(HTMLVideoElement) !== undefined && typeof(HTMLAudioElement) !== undefined && typeof(HTMLCanvasElement) !== undefined) ? true : false;

        /* Protocol like 'http://' or 'https://' */
        $.browser.protocol = ((window.location.href.indexOf('://') !== -1) ? $.browser.protocol = window.location.href.substring(0, window.location.href.indexOf('://') + 3) : $.browser.protocol = 'file://');

        /* Real Hostname (without the 'www.') */
        $.browser.host = window.location.hostname.toLowerCase().replace(/(www.|ftp.|ftps.|mail.|mailto.|imap.|smtp.|pop.|pop3.)/gi, '');

        /* Original Hostname (perhabs with the 'www.') */
        $.browser.hostname = window.location.hostname.toLowerCase();

        /* Host-Address */
        $.browser.hostaddr = $.browser.protocol + $.browser.hostname + '/';

        /* Get the realpath of the current window.location.href */
        $.browser.realpath();

        /* Get the base filename of the current window.location.href  */
        $.browser.basename;

        /* Browser viewport */
        $.browser.innerWidth  = $.browser.viewWidth  = (window.innerWidth || self.innerWidth || (document.documentElement && document.documentElement.clientWidth) || document.body.clientWidth);
        $.browser.innerHeight = $.browser.viewHeight = (window.innerHeight || self.innerHeight || (document.documentElement && document.documentElement.clientHeight) || document.body.clientHeight);

        /* Available screen resultion of the current system browser running in */
        $.browser.screenWidth  = (screen.width || 0);
        $.browser.screenHeight = (screen.height || 0);

        /* Check Plugins */
        $.each(l, function(i, n) { p(i); });

	};

    /**
     * Init the browser check
     */
	$.browserTest(navigator.userAgent);

    /**
     * Compatibility for some other Plugins made by
     * Michael Keck (http://www.michaelkeck.de/)
     */
    //$.usragnt = $.browser;

    /**
     * DEBUGGING
     * --------------------------------------------
     *
     * var dbg = '';
     * for (var b in $.browser) {
     *    if (typeof($.browser[b]) == 'function') {
     *       continue;
     *   }
     *   if (typeof($.browser[b]) !== 'object') {
     *       dbg += b + '\t: ' + $.browser[b] + '\n';
     *   } else {
     *       dbg += b + ': ' + (($.browser[b]) ? true : false) + '\n';
     *       for (var bb in $.browser[b]) {
     *           dbg += '\t  ' + b + '.' + bb + '\t= ' + $.browser[b][bb] + '\n';
     *       }
     *   }
     * }
     * alert(dbg);
     */

})(jQuery);;
/*
 * jQuery replaceText - v1.1 - 11/21/2009
 * http://benalman.com/projects/jquery-replacetext-plugin/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($){$.fn.replaceText=function(b,a,c){return this.each(function(){var f=this.firstChild,g,e,d=[];if(f){do{if(f.nodeType===3){g=f.nodeValue;e=g.replace(b,a);if(e!==g){if(!c&&/</.test(e)){$(f).before(e);d.push(f)}else{f.nodeValue=e}}}}while(f=f.nextSibling)}d.length&&$(d).remove()})}})(jQuery);;

