/* plugins */
/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();


// IE5.5+ PNG Alpha Fix v2.0 Alpha: Background Tiling Support
// (c) 2008-2009 Angus Turnbull http://www.twinhelix.com

// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

var IEPNGFix = window.IEPNGFix || {};

IEPNGFix.tileBG = function(elm, pngSrc, ready) {
	// Params: A reference to a DOM element, the PNG src file pathname, and a
	// hidden "ready-to-run" passed when called back after image preloading.

	var data = this.data[elm.uniqueID],
		elmW = Math.max(elm.clientWidth, elm.scrollWidth),
		elmH = Math.max(elm.clientHeight, elm.scrollHeight),
		bgX = elm.currentStyle.backgroundPositionX,
		bgY = elm.currentStyle.backgroundPositionY,
		bgR = elm.currentStyle.backgroundRepeat;

	// Cache of DIVs created per element, and image preloader/data.
	if (!data.tiles) {
		data.tiles = {
			elm: elm,
			src: '',
			cache: [],
			img: new Image(),
			old: {}
		};
	}
	var tiles = data.tiles,
		pngW = tiles.img.width,
		pngH = tiles.img.height;

	if (pngSrc) {
		if (!ready && pngSrc != tiles.src) {
			// New image? Preload it with a callback to detect dimensions.
			tiles.img.onload = function() {
				this.onload = null;
				IEPNGFix.tileBG(elm, pngSrc, 1);
			};
			return tiles.img.src = pngSrc;
		}
	} else {
		// No image?
		if (tiles.src) ready = 1;
		pngW = pngH = 0;
	}
	tiles.src = pngSrc;

	if (!ready && elmW == tiles.old.w && elmH == tiles.old.h &&
		bgX == tiles.old.x && bgY == tiles.old.y && bgR == tiles.old.r) {
		return;
	}

	// Convert English and percentage positions to pixels.
	var pos = {
			top: '0%',
			left: '0%',
			center: '50%',
			bottom: '100%',
			right: '100%'
		},
		x,
		y,
		pc;
	x = pos[bgX] || bgX;
	y = pos[bgY] || bgY;
	if (pc = x.match(/(\d+)%/)) {
		x = Math.round((elmW - pngW) * (parseInt(pc[1]) / 100));
	}
	if (pc = y.match(/(\d+)%/)) {
		y = Math.round((elmH - pngH) * (parseInt(pc[1]) / 100));
	}
	x = parseInt(x);
	y = parseInt(y);

	// Handle backgroundRepeat.
	var repeatX = { 'repeat': 1, 'repeat-x': 1 }[bgR],
		repeatY = { 'repeat': 1, 'repeat-y': 1 }[bgR];
	if (repeatX) {
		x %= pngW;
		if (x > 0) x -= pngW;
	}
	if (repeatY) {
		y %= pngH;
		if (y > 0) y -= pngH;
	}

	// Go!
	this.hook.enabled = 0;
	if (!({ relative: 1, absolute: 1 }[elm.currentStyle.position])) {
		elm.style.position = 'relative';
	}
	var count = 0,
		xPos,
		maxX = repeatX ? elmW : x + 0.1,
		yPos,
		maxY = repeatY ? elmH : y + 0.1,
		d,
		s,
		isNew;
	if (pngW && pngH) {
		for (xPos = x; xPos < maxX; xPos += pngW) {
			for (yPos = y; yPos < maxY; yPos += pngH) {
				isNew = 0;
				if (!tiles.cache[count]) {
					tiles.cache[count] = document.createElement('div');
					isNew = 1;
				}
				var clipR = Math.max(0, xPos + pngW > elmW ? elmW - xPos : pngW),
					clipB = Math.max(0, yPos + pngH > elmH ? elmH - yPos : pngH);
				d = tiles.cache[count];
				s = d.style;
				s.behavior = 'none';
				s.left = (xPos - parseInt(elm.currentStyle.paddingLeft)) + 'px';
				s.top = yPos + 'px';
				s.width = clipR + 'px';
				s.height = clipB + 'px';
				s.clip = 'rect(' +
					(yPos < 0 ? 0 - yPos : 0) + 'px,' +
					clipR + 'px,' +
					clipB + 'px,' +
					(xPos < 0 ? 0 - xPos : 0) + 'px)';
				s.display = 'block';
				if (isNew) {
					s.position = 'absolute';
					s.zIndex = -999;
					if (elm.firstChild) {
						elm.insertBefore(d, elm.firstChild);
					} else {
						elm.appendChild(d);
					}
				}
				this.fix(d, pngSrc, 0);
				count++;
			}
		}
	}
	while (count < tiles.cache.length) {
		this.fix(tiles.cache[count], '', 0);
		tiles.cache[count++].style.display = 'none';
	}

	this.hook.enabled = 1;

	// Cache so updates are infrequent.
	tiles.old = {
		w: elmW,
		h: elmH,
		x: bgX,
		y: bgY,
		r: bgR
	};
};


IEPNGFix.update = function() {
	// Update all PNG backgrounds.
	for (var i in IEPNGFix.data) {
		var t = IEPNGFix.data[i].tiles;
		if (t && t.elm && t.src) {
			IEPNGFix.tileBG(t.elm, t.src);
		}
	}
};
IEPNGFix.update.timer = 0;

if (window.attachEvent && !window.opera) {
	window.attachEvent('onresize', function() {
		clearTimeout(IEPNGFix.update.timer);
		IEPNGFix.update.timer = setTimeout(IEPNGFix.update, 100);
	});
}
/* end plugins */

/* custom functions */
function jsAnalytics(category, label){ 
	//alert(category +" : "+label);
	// pageTracker._trackEvent(category, 'Click', label);
	_gaq.push(['_trackEvent', category, 'Click', label]);
}
/* end custom functions */

/* ******************** ------------------------- CUSTOM READY ------------------------- ******************** */
$(document).ready(function() {

	//------------------ resize text --------------------//
	$('#text_controls a').click(function(){
	//	var ourText = $('.content p, .content li, #safety p, #safety li');
		var ourText = $('h3, .content > p, .content > ul li, .special_bot > p, .special_bot > ul li, #indication p, #safety p, #safety li, .phpsearch_header, .results_subhead, .phpsearch_results, .phpsearch_pg, .phpsearch_list_item > p, .phpsearch_link > a');
		var currFontSize = ourText.css('fontSize');
		var finalNum = parseFloat(currFontSize, 10);
		var stringEnding = currFontSize.slice(-2);
		if(this.id == 'text_larger') {
			finalNum *= 1.2;
			if (finalNum >= 20) {finalNum = 20;}
		}
		if (this.id == 'text_smaller'){
			finalNum /=1.2;
			if (finalNum <= 9) {finalNum = 9;}
		}
		
		else if (this.id == 'text_normal') {
			finalNum = 14;
		}
		ourText.animate({fontSize: finalNum + stringEnding},600);
	});

	/* original
	$('#text_controls a').click(function(){
		var ourText = $('p, li');
		var currFontSize = ourText.css('fontSize');
		var finalNum = parseFloat(currFontSize, 10);
		var stringEnding = currFontSize.slice(-2);
		if(this.id == 'text_larger') {
			finalNum *= 1.2;
		}
		else if (this.id == 'text_smaller'){
			finalNum /=1.2;
		}
		ourText.animate({fontSize: finalNum + stringEnding},600);
	});

	$('#text_normal').click(function(){
		$('p, li').animate({
			fontSize: '14px'
		}, 600 );

		$('p#get_reader').animate({
			fontSize: '13px'
		}, 600 );

	});
	*/
	//------------------ /resize text --------------------//


	// -------------------- COLORBOX DECLARATIONS (used for interstitial pop ups) -------------------- //
	if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/android/i)) || (navigator.userAgent.match(/BlackBerry/i))) {
		$("#page_interstitial").addClass("ios");
	}
	
	$('.colorbox').colorbox({ iframe:true, transition:'fade', speed:350, width:'700px', height:'750px' });
	$('.colorbox_interstitial').colorbox({ iframe:true, transition:'fade', speed:350, width:'653px', height:'388px' });
	$('.colorbox_video').colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px' });


	// -------------------- JQUERY CORNER --------------------  //
	if (!($.browser.msie)) { 
		$('.toggleitem').corner('10px tl');
		$('.toggleitem').corner('10px bl');
	
		$('.acc_trigger').corner('10px tl');
		$('.acc_trigger.active').corner('10px tl');
	}
	
	//------------------ secondary callout --------------------//
	if (!($.browser.msie)) { 
		$('.secondary_callout').corner('10px tl');
		$('.secondary_callout').corner('10px bl');

		$('.callout_container').corner('10px tl');
	}

	// -------------------- VIDEO OVERLAY ROUNDED CORNER --------------------  //
	$('#content_howto_video').corner();
	$('#content_moa_video').corner();
	// -------------------- /VIDEO OVERLAY ROUNDED CORNER --------------------  //
	
	
	
	//------------------ flash embed --------------------//
	var flashvars = false;
	var params = {};
	params.wmode = "transparent";
	params.allowfullscreen = "true";
	var attributes = false;

	// Home page carousel
	var carouselflashvars = {  xmlPath: "coverflow/xml/data.xml"};
	swfobject.embedSWF("coverflow/swf/coverflow.swf", "home", "980", "590", "9.0.0", "", carouselflashvars, params, attributes);

	// How to take Zytiga Video
	var howflashvars = {  vidpath: "how_to_take_zytiga.mp4", vidtitle: "How to Take Zytiga(r)"};
	swfobject.embedSWF("video/videoPlayer.swf", "how_video_wrapper", "666", "362", "9.0.0", "", howflashvars, params, attributes);

	// How Zytiga Works Video
	var MOAflashvars = {  vidpath: "how_zytiga_works.flv", vidtitle: "How Zytiga(r) Works"};
	swfobject.embedSWF("video/videoPlayer.swf", "moa_video_wrapper", "666", "362", "9.0.0", "", MOAflashvars, params, attributes);


	
	// -------------------- ACCORDION -------------------- //
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	//$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
	//$('.acc_trigger:first').find('.indicator').addClass('on'); //Add "on" class to first trigger indicator
	
	//On Click
	$('.acc_trigger').click(function(){
		$('.indicator').removeClass('on');
		$(this).find('.indicator').addClass('on');
		
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
		}
		else {
			$(this).next().slideUp(); // add this to toggle an already open item
			$('.acc_trigger').removeClass('active'); // remove active class from trigger so arrow is correct
			$(this).find('.indicator').removeClass('on');
		}
		return false; //Prevent the browser jump to the link anchor
	});


	// -------------------- ACCORDION LINKS -------------------- //
	// Get Resources
	$('#btn_callout_resources').click(function() {
		window.location.href = '../register.php';
		jsAnalytics("Information Kit", "Register for Zytiga Information Kit");
	});
	
	$("#sidebar_get_info_kit").click(function() {
		jsAnalytics("Information Kit", "Get a Free Information Kit and Other Resources");
	});

	// Activate Your Card
	$('#btn_callout_activate').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'653px', height:'388px', href:"../interstitials/interstitial_activate.html" });
		jsAnalytics("Savings Card", "Activate Your Instant Savings Card - Activate Your Card");
	});
	
	$("#sidebar_activate").click(function() {
		jsAnalytics("Savings Card", "Activate Your Instant Savings Card");
	});

	// Activate Your Card - HOME PAGE
	$('#btn_home_activate').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'653px', height:'388px', href:"interstitials/interstitial_activate.html" });
		jsAnalytics("Savings Card", "Activate Your Instant Savings Card");
	});

	// Enroll Now
	$('#btn_callout_enroll').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'653px', height:'388px', href:"../interstitials/interstitial_enroll.html" });
		jsAnalytics("Enrollment", "Enroll in our Instant Savings Program - Enroll Now");
	});
	
	$("#sidebar_enroll_instant").click(function() {
		jsAnalytics("Enrollment", "Enroll in our Instant Savings Program");
	});

	// Enroll Now - HOME PAGE
	$('#btn_home_enroll').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'653px', height:'388px', href:"interstitials/interstitial_enroll.html" });
		jsAnalytics("Enrollment", "Enroll in our Instant Savings Program");
	});

	// See Your Options
	$('#btn_callout_options').click(function() {
		window.location.href = '../support_and_resources/zytiga_coverage.php';
		jsAnalytics("Options", "Learn About Affordability Options");
	});

	$("#sidebar_learn_about").click(function() {
		jsAnalytics("Options", "Learn About Affordability Options - See Your Options");
	});

	// Watch MOA video (Secondary callout)
	$('#btn_callout_watch, .btn_watch_how_video').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px', href:"../video_moa.html" });
	});

	// get cap app
	$('#btn_callout_download').click(function(e) {
		//window.location.href = 'downloads/test.pdf';
		//window.open('downloads/test.pdf');
		e.preventDefault();  //stop the browser from following link
	});


	// Watch how to take video (how zytiga works page)
	$('.btn_watch_video').click(function() {
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px', href:"../video_how.html" });
	});
	
	$("#moavideo_player .btn_watch_video").click(function() {
		jsAnalytics("Click", "Video_See How Zytiga Works_html");
	});

	/*
	$("#moavideo_player .btn_watch_video").click(function() {
		jsAnalytics("Click", "Video_See How Zytiga Works_html");
	});
	*/

	// -------------------- LINK BEHAVIORS -------------------- // 
	$('.external').click(function(){ window.open(this.href); return false; });
	$('#link_print').click(function(){ window.print(); return false; });
	

	// -------------------- VIDEO OVERLAY LINKS -------------------- //
	// close window
	$('#btn_video_close').click(function() {
		parent.$.fn.colorbox.close();
	});

	// download MOA video
	$('#btn_videomoa_dwnld').click(function(e) {
		//window.location.href = '../downloads/how_zytiga_works.mp4';
		window.open('../video/how_zytiga_works.zip');
		e.preventDefault();  //stop the browser from following link
	});
	
	// download howto video
	$('#btn_video_dwnld').click(function(e) {
		//window.location.href = '../downloads/how_to_take_zytiga.mp4';
		window.open('../video/how_to_take_zytiga.zip');
		e.preventDefault();  //stop the browser from following link
	});
	
	$("#content_howto_video #btn_video_dwnld").click(function() {
		jsAnalytics("Download Video", "Video_See How Zytiga Works_Download_html");
	});
	
	$("#content_moa_video #btn_videomoa_dwnld").click(function() {
		jsAnalytics("Download Video", "Video_See How Zytiga Works_Download_html");
	});

	// share video via email
	$('#btn_video_email').click(function(e) {
		window.location.href = '../email_video.php';
		//window.open('../email_page.php');
		e.preventDefault();  //stop the browser from following link
	});
	
	$("#content_howto_video #btn_video_email").click(function() {
		jsAnalytics("Sharing", "Video_See How Zytiga Works_Share Via Email_html");
	});
	
	$("#content_moa_video #btn_video_email").click(function() {
		jsAnalytics("Sharing", "Video_See How Zytiga Works_Share Via Email_html");
	});

	// share video via twitter
	$('#btn_video_twitter').click(function(e) {
		//window.location.href = 'http://twitter.com';
		window.open('http://twitter.com/share?url=http://www.zytiga.com/about_zytiga/how_zytiga_works.php&amp;text=You%20might%20be%20interested%20in%20this%20HCP%20video%3A');
		e.preventDefault();  //stop the browser from following link
	});
	
	$("#content_howto_video #btn_video_twitter").click(function() {
		jsAnalytics("Sharing", "Video_See How Zytiga Works_Share Via Twitter_html");
	});
	
	$("#content_moa_video #btn_video_twitter").click(function() {
		jsAnalytics("Sharing", "Video_See How Zytiga Works_Share Via Twitter_html");
	});


	/* misc analytics */
	$("#link_email").click(function() {
		jsAnalytics("Sharing", "Share Via Email");
	});
	
	$("#link_twitter").click(function() {
		jsAnalytics("Sharing", "Share Via Twitter");
	});
	
	$("#link_print").click(function() {
		jsAnalytics("Print", "Print Page");
	});
	
	$("#link_ipi").click(function() {
		jsAnalytics("Product Information", "Important Product Information");
	});
	
	$("#link_patient").click(function() {
		jsAnalytics("Patient Information", "Full Patient Information");
	});
	
	$("#download_patient_form").click(function() {
		jsAnalytics("Form Download", "Patient Enrollment Form");
	});
	
	$("#form_button_submit").click(function() {
		jsAnalytics("Registration", "Submit - Register for a Zytiga Information Kit");
	});
	/* end misc analytics */

	
	// -------------------- DOWNLOAD LINKS - IN PAGE CALLOUTS -------------------- //
	// get zytigaOne support
	$('#button_signup_support').click(function() {
		window.location.href = '../support_and_resources/';
	});
	
	// print discover zytiga brochure
	$('#print_discover').click(function(e) {
		//window.location.href = 'downloads/discover_zytiga_brochure.pdf';
		window.open('../downloads/discover_zytiga_brochure.pdf');
		jsAnalytics("Brochure Download", "Discover Zytiga");
		
		e.preventDefault();  //stop the browser from following link
	});

	// print support brochure
	$('#print_brochure').click(function(e) {
		//window.location.href = 'downloads/zytigaone_support_brochure.pdf';
		window.open('../downloads/zytigaone_support_brochure.pdf');
		jsAnalytics("Brochure Download", "Zytiga One");
		
		e.preventDefault();  //stop the browser from following link
	});

	// print starting zytiga brochure
	$('#print_starting').click(function(e) {
		//window.location.href = 'downloads/zytiga_getting_started_brochure.pdf';
		window.open('../downloads/zytiga_getting_started_brochure.pdf');
		jsAnalytics("Brochure Download", "Starting Zytiga");
		
		e.preventDefault();  //stop the browser from following link
	});

	// print zytiga one brochure
	$('#print_zytiga_one').click(function(e) {
		//window.location.href = 'downloads/zytigaone_support_brochure.pdf';
		window.open('../downloads/zytigaone_support_brochure.pdf');
		jsAnalytics("Brochure Download", "Zytiga One");
		
		e.preventDefault();  //stop the browser from following link
	});

	// print med tracker
	$('#print_med_tracker, #print_med_tracker_link').click(function(e) {
		//window.location.href = 'downloads/zytiga_medication_tracker.pdf';
		window.open('../downloads/zytiga_medication_tracker.pdf');
		jsAnalytics("Print", "Print the Zytiga Medication Tracker");
		
		e.preventDefault();  //stop the browser from following link
	});

	// get cap app
	$('#download_cap_app').click(function(e) {
		//window.location.href = 'http://';
		//window.open('http://');
		e.preventDefault();  //stop the browser from following link
	});

	// print dr. discussion guide
	$('#print_dr_disc').click(function(e) {
		//window.location.href = 'downloads/zytiga_doctor_discussion_guide.pdf';
		window.open('../downloads/zytiga_doctor_discussion_guide.pdf');
		jsAnalytics("Print", "Print Your Doctor Discussion Guide");
		
		e.preventDefault();  //stop the browser from following link
	});


	// -------------------- POP UP and INTERSTITIAL PAGE LINKS -------------------- //
	// close window (email page & email video success page)
	$('#button_popup_close').click(function() {
		parent.$.fn.colorbox.close();
	});

	// close window
	$('#btn_popup_cancel').click(function() {
		parent.$.fn.colorbox.close();
	});

	// To HCP site
	$('#btn_popup_zytigahcp').click(function(e) {
		//window.parent.location = "http://www.zytigahcp.com";	
		window.open('http://www.zytigahcp.com/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Share via Twitter
	$('#btn_popup_twitter').click(function(e) {
		//window.parent.location = "http://twitter.com/share?url=http://www.zytiga.com";	
  window.open('http://twitter.com/share?url=http://www.zytiga.com');

		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Download Adobe Reader
	$('#btn_popup_adobe_reader').click(function(e) {
		//window.parent.location = "http://get.adobe.com/reader/";	
		window.open('http://get.adobe.com/reader/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// About Janssen
	$('#btn_popup_aboutjanssen').click(function(e) {
		//window.parent.location = "http://www.janssenbiotech.com/";	
		window.open('http://www.janssenbiotech.com/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Contact us
	$('#btn_popup_contactus').click(function(e) {
		//window.parent.location = "http://www.janssenbiotech.com/contact-us";	
		window.open('http://www.janssenbiotech.com/contact-us');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// FDA medwatch
	$('#btn_popup_fdamedwatch').click(function(e) {
		//window.parent.location = "www.fda.gov/medwatch";	
		window.open('http://www.fda.gov/medwatch');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Activate your card
	$('#btn_popup_activate').click(function(e) {
		//window.parent.location = "https://webrebate.trialcard.com/Coupon/ZytigaPortal/";	
		window.open('https://webrebate.trialcard.com/Coupon/ZytigaPortal/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Enroll in Instant Savings Program
	$('#btn_popup_enroll').click(function(e) {
		//window.parent.location = "https://webrebate.trialcard.com/Coupon/ZytigaPortal/";	
		window.open('https://webrebate.trialcard.com/Coupon/ZytigaPortal/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Learn about affordability options
	$('#btn_popup_affordability').click(function(e) {
		//window.parent.location = "http://www.janssenaccessone.com/pages/zytiga/patientassist/intro.jsp";	
		window.open('http://www.janssenaccessone.com/pages/zytiga/patientassist/intro.jsp');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// ZytigaOne support
	$('#btn_popup_zytigaonesupport').click(function(e) {
		//window.parent.location = "http://www.janssenaccessone.com/pages/zytiga/index.jsp";	
		window.open('http://www.janssenaccessone.com/pages/zytiga/index.jsp');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// American Cancer Society
	$('#btn_popup_acs').click(function(e) {
		//window.parent.location = "http://www.cancer.org";	
		window.open('http://www.cancer.org');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// AUAF
	$('#btn_popup_auaf').click(function(e) {
		//window.parent.location = "http://www.urologyhealth.org/";	
		window.open('http://www.urologyhealth.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Cancer Care
	$('#btn_popup_cancercare').click(function(e) {
		//window.parent.location = "http://www.cancercare.org";	
		window.open('http://www.cancercare.org');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Cancer Support Community
	$('#btn_popup_cancersupport').click(function(e) {
		//window.parent.location = "http://www.cancersupportcommunity.org/";	
		window.open('http://www.cancersupportcommunity.org/');  /* original url: http://www.thewellnesscommunity.org/Default.aspx */
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// J&J Strength for Caring
	$('#btn_popup_jjstrength').click(function(e) {
		//window.parent.location = "http://www.strengthforcaring.com/";	
		window.open('http://www.strengthforcaring.com/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// J&J Patient Assistance Foundation
	$('#btn_popup_jjapf').click(function(e) {
		//window.parent.location = "http://www.jjpaf.org/";	
		window.open('http://www.jjpaf.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Mens Health Network
	$('#btn_popup_menshealth').click(function(e) {
		//window.parent.location = "http://www.menshealthnetwork.org/";	
		window.open('http://www.menshealthnetwork.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// MyProstateCancerRoadMap.com
	$('#btn_popup_roadmap').click(function(e) {
		//window.parent.location = "http://www.myprostatecancerroadmap.com/";	
		window.open('http://www.myprostatecancerroadmap.com/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// National Cancer Institute
	$('#btn_popup_nci').click(function(e) {
		//window.parent.location = "http://www.cancer.gov/cancertopics/types/prostate";	
		window.open('http://www.cancer.gov/cancertopics/types/prostate');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// National Comprehensive Cancer Network
	$('#btn_popup_nccn').click(function(e) {
		//window.parent.location = "http://www.nccn.org";	
		window.open('http://www.nccn.org');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Prostate Cancer Foundation
	$('#btn_popup_pcf').click(function(e) {
		//window.parent.location = "http://www.pcf.org/site/c.leJRIROrEpH/b.5699537/k.BEF4/Home.htm";	
		window.open('http://www.pcf.org/site/c.leJRIROrEpH/b.5699537/k.BEF4/Home.htm');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Prostate Cancer Research Institute
	$('#btn_popup_pcri').click(function(e) {
		//window.parent.location = "http://www.prostate-cancer.org/pcricms/";	
		window.open('http://www.prostate-cancer.org/pcricms/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Prostate Health Education Network
	$('#btn_popup_phen').click(function(e) {
		//window.parent.location = "http://www.prostatehealthed.org/";	
		window.open('http://www.prostatehealthed.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Prostate Net
	$('#btn_popup_pnet').click(function(e) {
		//window.parent.location = "http://www.prostate-online.com/";	
		window.open('http://www.prostate-online.com/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// UsToo
	$('#btn_popup_ustoo').click(function(e) {
		//window.parent.location = "http://www.ustoo.org/Default.asp";	
		window.open('http://www.ustoo.org/Default.asp');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// Women Against Prostate Cancer
	$('#btn_popup_womenagainst').click(function(e) {
		//window.parent.location = "http://www.womenagainstprostatecancer.org/";	
		window.open('http://www.womenagainstprostatecancer.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});

	// ZERO
	$('#btn_popup_zero').click(function(e) {
		//window.parent.location = "http://zerocancer.org/";	
		window.open('http://zerocancer.org/');
		parent.$.fn.colorbox.close();
		e.preventDefault();  //stop the browser from following link
	});
	// -------------------- /POP UP and INTERSTITIAL PAGE LINKS  -------------------- //



	// -------------------- CLUETIP TOOLTIP: TOOLS (must be after accordion code otherwise accordion breaks) --------------------  //
	$('a.tooltip_pop').cluetip({
		attribute: 'rel',
		arrows: true,
		dropShadow: false,
		hoverIntent: false,
		sticky: false,
		mouseOutClose: true,
		cursor: 'help',
		activation: 'hover',
		closePosition: 'title',
		waitImage: false,
		positionBy: 'bottomTop', topOffset: 20,
		showTitle: false
	});
	// -------------------- /CLUETIP TOOLTIP: TOOLS --------------------  //

	// -------------------- TARGET IPAD FOR CLUETIP "HOVER" -------------------- //
	/*
	function touchstart( e ) {
		e.preventDefault();
		return false;
	}
	*/

	if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {

		$("a.tooltip_pop").live("touchstart", function (event) {
			var e = event.originalEvent;
			$(document).trigger('cluetip');
		});
		
		$("#cluetip").live("touchstart", function (event) {
			var e = event.originalEvent;
			$(document).trigger('hideCluetip');
		});
	}
	// -------------------- /TARGET IPAD FOR CLUETIP "HOVER"	 -------------------- //

	// -------------------- JQUERY CORNER TOOLTIPS (for rounded corners in IE) --------------------  //
	if (($.browser.msie)) {
		$('#cluetip').corner();

	}
	// -------------------- /JQUERY CORNER TOOLTIPS (for IE) --------------------  //
	

	/* tabs 
	$("#content .content").hide();
	$("#content .content:first").show();
	
	$("ul.tabs li a").click(function() {
		$("ul.tabs li a").removeClass("on");
		$("#content .content").hide();

		$(this).addClass("on");
		tab_name = $(this).attr("id");
		div_name = "#content_" + tab_name.substring(4);

		$(div_name).fadeIn("fast");

		return false;
	});
	 end tabs */


	// -------------------- FORM ERRORS -------------------- //
	//$('.error').hide();

	// -------------------- CLEAR INPUT FIELD DEFAULT VALUE -------------------- //
	$('input, textarea').each(function() {
		var default_value = this.value;
		$(this).focus(function() {
 			if(this.value == default_value) {
				this.value = '';
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
				this.value = default_value;
			}
		});
	});
	// -------------------- /CLEAR INPUT FIELD DEFAULT VALUE -------------------- //
	/* home ipad */
	if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		$("#home").hide();
		$("#home_ipad").show();
	}

	// home carousel
	$("#home_carousel_ipad_next").live('touchstart', function() {
		$(this).trigger("click");
	});
	
	$("#home_carousel_ipad_previous").live('touchstart', function() {
		$(this).trigger("click");
	});
	
	$("#carousel_cards .card:first").show();
	
	$("#carousel_left").click(function() {
		var to_show = 1;
		
		$("#carousel_cards .card").each(function(i) {
			if ( $(this).is(":visible") ) {
				to_show = i;
			}
		});
		
		$("#carousel_cards .card").hide();
		$("#carousel_dots a").removeClass("on");
		
		if (to_show > 0) {
			$("#carousel_card_" + to_show).fadeIn();
			$("#carousel_dots a").eq(to_show-1).addClass("on");
		} else if (to_show == 0) {
			$("#carousel_cards .card:last").fadeIn();
			$("#carousel_dots a:last").addClass("on");
		} else {
			$("#carousel_cards .card:first").fadeIn();
			$("#carousel_dots a:first").addClass("on");
		}
		
		return false;
	});
	
	$("#carousel_right").click(function() {
		var to_show = 1;
		var total_cards = $("#carousel_cards .card").length;
		
		$("#carousel_cards .card").each(function(i) {
			if ( $(this).is(":visible") ) {
				to_show = i;
			}
		});
		
		to_show += 2;
		
		$("#carousel_cards .card").hide();
		$("#carousel_dots a").removeClass("on");
		
		if (to_show <= total_cards) {
			$("#carousel_card_" + to_show).fadeIn();
			$("#carousel_dots a").eq(to_show-1).addClass("on");
		} else  {
			$("#carousel_cards .card:first").fadeIn();
			$("#carousel_dots a:first").addClass("on");
		}
		
		return false;
	});
	
	$("#carousel_dots a").click(function() {
		var to_show = "#carousel_card_" + $(this).html();
		$("#carousel_cards .card").hide();
		$(to_show).fadeIn();
		$("#carousel_dots a").removeClass("on");
		$(this).addClass("on");
		return false;
	});
	// home carousel end
	
	// carousel analytics
	$("#carousel_card_1 a").click(function() {
		jsAnalytics("Image Rotator", "Learn More - About Zytiga_Img_Rotator");
	});
	
	$("#carousel_card_2 a").click(function() {
		jsAnalytics("Image Rotator", "Learn about the Benefits of Zytiga_Img_Rotator");
	});
	
	$("#carousel_card_3 a").click(function() {
		jsAnalytics("Image Rotator", "See How Zytiga Works_Img_Rotator");
	});
	
	$("#carousel_card_4 a").click(function() {
		jsAnalytics("Image Rotator", "Learn More - Taking Zytiga_Img_Rotator");
	});
	
	$("#carousel_card_5 a").click(function() {
		jsAnalytics("Image Rotator", "Learn More - Sign up to receive more information_Img_Rotator");
	});

	// nav on states
	var pathname = window.location.pathname;
	var path_chunks = pathname.split("/");
	
	var section = path_chunks[1];
	var page_name = path_chunks[2];
	
	if (section == "about_zytiga") {
		$("#nav_about").addClass("on");
		
		if (page_name == "index.php" || !page_name) {
			$("#tab_overview").addClass("on");
		} else if (page_name == "how_zytiga_works.php") {
			$("#tab_how_zytiga_works").addClass("on");
		} else if (page_name == "side_effects.php") {
			$("#tab_side_effects").addClass("on");
		} else if (page_name == "faqs.php") {
			$("#tab_faqs").addClass("on");
		}
	} else if (section == "taking_zytiga") {
		$("#nav_taking").addClass("on");
		
		if (page_name == "index.php" || !page_name) {
			$("#tab_overview").addClass("on");
		} else if (page_name == "staying_on_treatment.php") {
			$("#tab_staying_on_treatment").addClass("on");
		} else if (page_name == "getting_zytiga.php") {
			$("#tab_getting_zytiga").addClass("on");
		} else if (page_name == "dos_and_donts.php") {
			$("#tab_dos_donts").addClass("on");
		}
	} else if (section == "support_and_resources") {
		$("#nav_support").addClass("on");
		
		if (page_name == "index.php" || !page_name) {
			$("#tab_overview").addClass("on");
		} else if (page_name == "zytiga_coverage.php") {
			$("#tab_coverage").addClass("on");
		} else if (page_name == "resources.php") {
			$("#tab_resources").addClass("on");
		}
	} else if (section == "talking_to_your_doctor") {
		$("#nav_talking").addClass("on");
	} else if (section == "about_the_illness") {
		$("#nav_aboutillness").addClass("on");
	} else if (section == "for_caregivers") {
		$("#nav_caregivers").addClass("on");
		
		if (page_name == "index.php" || !page_name) {
			$("#tab_overview").addClass("on");
		} else if (page_name == "caring_for_caregiver.php") {
			$("#tab_caregiver").addClass("on");
		}
	}
	// nav on states end
getHost();

	
});
/* ******************** ------------------------- /CUSTOM READY ------------------------- ******************** */




function getHost() {
	var url = window.location.href;
	if (url.indexOf('?MOA=true')>-1){
		$.colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px', href:"../video_how.html" });
		}
	else if(url.indexOf('?show=')>-1){
		if(url.indexOf('?show=contact')>-1){
			$.colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px', href:"/interstitials/interstitial_contactus.html" });
			}
		if(url.indexOf('?show=about')>-1){
			$.colorbox({ iframe:true, transition:'fade', speed:350, width:'800px', height:'750px', href:"/interstitials/interstitial_about_janssen.html" });
			}						
				
	}
}




function register_selection(thisValue){
	 if (thisValue==1){
		$('#patient').css('display', 'block');
		$('#caregiver').css('display', 'none');
	 }else{
	 	$('#patient').css('display', 'none');
		$('#caregiver').css('display', 'block');
	 }
}


function third_question_choice(thisValue, secondquestion){
	 if (thisValue==1){   var parentDiv="patient"; }
	 else{ var parentDiv="caregiver"; }
	 
	 if (secondquestion==1){$('#' + parentDiv + "> #thirdquestion").css('display', 'block'); }
		else { $('#' + parentDiv + "> #thirdquestion").css('display', 'none');}
fourth_question_choice(thisValue, secondquestion);
}

function fourth_question_choice(thisValue, secondquestion){
	 if (thisValue==1){   var parentDiv="patient"; }
	 else{ var parentDiv="caregiver"; }
	 
	 if (secondquestion==2){$('#' + parentDiv + "> #fourthquestion").css('display', 'block'); }
		else { $('#' + parentDiv + "> #fourthquestion").css('display', 'none');}

}


var lastFlashEvent='';
function flashAnalytics(category, label){ 
	
	if (label.indexOf(' played')>-1){
	    label= lastFlashEvent +" : "+label;
	}else{
		lastFlashEvent=label;
	}
	console.log('/' + category + '/' + label);
	 _gaq.push(['_trackEvent', category, label ]);
	 
	// _gaq.push(['_trackPageview', '/' + category + '/' + label ]);
	//pageTracker._trackEvent(category, 'Click', label);
}



