(function($){$.fn.ContentSlider=function(options)
{var defaults={leftBtn:'http://s1.miid.me/lt_arrow.png',rightBtn:'http://s1.miid.me/rt_arrow.png',width:'700px',height:'350px',speed:400,easing:'easeOutQuad',textResize:false,IE_h2:'26px',IE_p:'11px'}
var defaultWidth=defaults.width;var o=$.extend(defaults,options);var w=parseInt(o.width);var n=this.children('.cs_wrapper').children('.cs_slider').children('.cs_article').length;var x=-1*w*n+w;var p=parseInt(o.width)/parseInt(defaultWidth);var thisInstance=this.attr('id');var inuse=false;function moveSlider(d,b)
{var l=parseInt(b.siblings('.cs_wrapper').children('.cs_slider').css('left'));if(isNaN(l)){var l=0;}
var m=(d=='left')?l-w:l+w;if(m<=0&&m>=x){b.siblings('.cs_wrapper').children('.cs_slider').animate({'left':m+'px'},o.speed,o.easing,function(){inuse=false;});if(b.attr('class')=='cs_leftBtn'){var thisBtn=$('#'+thisInstance+' .cs_leftBtn');var otherBtn=$('#'+thisInstance+' .cs_rightBtn');}else{var thisBtn=$('#'+thisInstance+' .cs_rightBtn');var otherBtn=$('#'+thisInstance+' .cs_leftBtn');}
if(m==0||m==x){thisBtn.animate({'opacity':'0'},o.speed,o.easing,function(){thisBtn.hide();});}
if(otherBtn.css('opacity')=='0'){otherBtn.show().animate({'opacity':'1'},{duration:o.speed,easing:o.easing});}}}
function vCenterBtns(b)
{var mid=parseInt(o.height)/2;b.find('.cs_leftBtn img').css({'top':mid+'px','padding':0}).end().find('.cs_rightBtn img').css({'top':mid+'px','padding':0});}
return this.each(function(){$(this).css({width:o.width,height:o.height}).prepend('<a href="#" class="cs_leftBtn"><img src="'+o.leftBtn+'" /></a>').append('<a href="#" class="cs_rightBtn"><img src="'+o.rightBtn+'" /></a>').find('.cs_article').css({width:o.width,height:o.height}).end().find('.cs_leftBtn').css('opacity','0').hide().end().find('.cs_rightBtn').hide().animate({'width':'show'});if(o.textResize===true){var h2FontSize=$(this).find('h2').css('font-size');var pFontSize=$(this).find('p').css('font-size');$.each(jQuery.browser,function(i){if($.browser.msie){h2FontSize=o.IE_h2;pFontSize=o.IE_p;}});$(this).find('h2').css({'font-size':parseFloat(h2FontSize)*p+'px','margin-left':'66%'});$(this).find('p').css({'font-size':parseFloat(pFontSize)*p+'px','margin-left':'66%'});$(this).find('.readmore').css({'font-size':parseFloat(pFontSize)*p+'px','margin-left':'66%'});}
var leftBtn=$(this).children('.cs_leftBtn');leftBtn.bind('click',function(){if(inuse===false){inuse=true;moveSlider('right',leftBtn);}
return false;});var rightBtn=$(this).children('.cs_rightBtn');rightBtn.bind('click',function(){if(inuse===false){inuse=true;moveSlider('left',rightBtn);}
return false;});vCenterBtns($(this));});}})(jQuery)
$(function(){$('#zero').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#first').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#second').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#third').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#four').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#five').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$('#six').ContentSlider({width:'380px',height:'206px',speed:400,easing:'easeOutQuad',textResize:true});$(function(){$("#accordion").accordion({header:"h3"});});});function getHealthSpotData(index)
{document.getElementById('nav_cntr_0').className='';document.getElementById('cntr_0_divider').className='';
document.getElementById('nav_cntr_1').className='';document.getElementById('cntr_1_divider').className='';
document.getElementById('nav_cntr_2').className='';document.getElementById('cntr_2_divider').className='';
document.getElementById('nav_cntr_3').className='';document.getElementById('cntr_3_divider').className='';
document.getElementById('nav_cntr_4').className='';document.getElementById('cntr_4_divider').className='';
document.getElementById('nav_cntr_5').className='';document.getElementById('cntr_5_divider').className='';
document.getElementById('nav_cntr_6').className='';document.getElementById('cntr_6_divider').className='';
document.getElementById('nav_cntr_7').className='';document.getElementById('cntr_7_divider').className='';
document.getElementById('nav_cntr_8').className='';document.getElementById('cntr_8_divider').className='';
document.getElementById('nav_cntr_'+index).className='show';document.getElementById('cntr_'+index+'_divider').className='noshow';
document.getElementById('cntr_0').className='';
document.getElementById('cntr_1').className='';
document.getElementById('cntr_2').className='';
document.getElementById('cntr_3').className='';
document.getElementById('cntr_4').className='';
document.getElementById('cntr_5').className='';
document.getElementById('cntr_6').className='';
document.getElementById('cntr_7').className='';
document.getElementById('cntr_8').className='';
document.getElementById('cntr_'+index).className='show';}
var browser=navigator.appName;var xmlDoc;var xmlObj;function SelectXMl(){if(browser=="Microsoft Internet Explorer"){loadXMLIE("EasyShop.xml")}else{loadxmlMoz("EasyShop.xml")}}function loadXMLIE(a){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.onreadystatechange=verify;xmlDoc.load(a);xmlObj=xmlDoc.documentElement.childNodes(0)}function verify(){if(xmlDoc.readyState!=4){return false}}function loadxmlMoz(a){if(window.XMLHttpRequest){var d = new XMLHttpRequest();d.open("GET", a, false);d.send(null);xmlDoc=d.responseXML;}else{xmlDoc=document.implementation.createDocument("","",null); xmlDoc.load(a);}}function AddProduct(){document.getElementById("topbot_index_DDProducts").length=0;var d=document.getElementById("topbot_index_DDCategory").value;if(d==""){document.getElementById("topbot_index_DDProducts").length=0;AddInDropDownList("topbot_index_DDProducts","Choose Product","");document.getElementById("topbot_index_DDDosage").length=0;AddInDropDownList("topbot_index_DDDosage","Choose Dosage","");document.getElementById("topbot_index_txtPrice").value="           ---          ";return false}var a,c;AddInDropDownList('topbot_index_DDProducts',"Choose Product","");if(browser=="Microsoft Internet Explorer"){for(b=0;b<xmlObj.childNodes.length;b++){a=xmlObj.childNodes(b).getAttribute("itemid");c=xmlObj.childNodes(b).getAttribute("mcat");if(xmlObj.childNodes(b).getAttribute("cat")==d){AddInDropDownList("topbot_index_DDProducts",xmlObj.childNodes(b).tagName,b+","+a+","+c)}}}else{for(var b=1;b<xmlDoc.documentElement.childNodes[1].childNodes.length;b+=2){a=xmlDoc.documentElement.childNodes[1].childNodes[b].attributes.getNamedItem("itemid").nodeValue;c=xmlDoc.documentElement.childNodes[1].childNodes[b].attributes.getNamedItem("mcat").nodeValue;if(xmlDoc.documentElement.childNodes[1].childNodes[b].attributes.getNamedItem("cat").nodeValue==d){AddInDropDownList("topbot_index_DDProducts",xmlDoc.documentElement.childNodes[1].childNodes[b].tagName,b+","+a+","+c)}}}AddPillsDesc()}function AddPillsDesc(){document.getElementById("topbot_index_DDDosage").length=0;document.getElementById("topbot_index_DDDosage").selectedIndex=0;var b=document.getElementById("topbot_index_DDProducts").value;b=b.split(",");var a=b[0];var c;var e,d;AddInDropDownList('topbot_index_DDDosage',"Choose Dosage","");if(browser=="Microsoft Internet Explorer"){for(c=0;c<xmlObj.childNodes(a).childNodes.length;c++){AddInDropDownList("topbot_index_DDDosage",xmlObj.childNodes(a).childNodes(c).getAttribute("desc"),xmlObj.childNodes(a).childNodes(c).getAttribute("price"))}}else{for(c=1;c<xmlDoc.documentElement.childNodes[1].childNodes[a].childNodes.length;c+=2){e=xmlDoc.documentElement.childNodes[1].childNodes[a].childNodes[c].attributes.getNamedItem("desc").nodeValue;d=xmlDoc.documentElement.childNodes[1].childNodes[a].childNodes[c].attributes.getNamedItem("price").nodeValue;AddInDropDownList("topbot_index_DDDosage",e,d)}}AddPrice()}function AddPrice(){if(document.getElementById('topbot_index_DDDosage').value != ''){document.getElementById('topbot_index_txtPrice').value = '        $'+ document.getElementById('topbot_index_DDDosage').value+"          ";}else{document.getElementById('topbot_index_txtPrice').value = "           ---          ";}}function AddInDropDownList(b,d,a){var e=document.createElement("option");e.text=d;e.value=a;try{document.getElementById(b).add(e,null)}catch(c){document.getElementById(b).add(e)}};

