jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeInOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInExpo:function(e,f,a,h,g){return(f===0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f===0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInRegular:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutRegular:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutRegular:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a}});

$(document).ready(function(){

	$('.middleCallout').each(function(e){
		if(e % 3 == 0){
			$(this).css('clear','both');
		}
	});
	
	$('#leftNav').each(function(){
		if(parseInt($(this).children().size()) <= 0){
			$(this).remove();
		}
	});
		$('.feature').each(function(e){
		if(e % 2 == 0){
			$(this).css('clear','both');
		}
	});
	swfobject.embedSWF("/static/flash/pharmacy_countdown.swf", "countdown", "180", "140", "8.0.0", "/static/flash/expressInstall.swf", "false", {wmode:"transparent"});
});
function navSpace(myWidth, mySpace, mySelector) {
      tabTotal = 0;
      var totalWidth = myWidth;
      var remainingWidth = myWidth;
      $(mySelector).not(mySelector + ' li').each(function(e) {
            totalWidth -= $(this).width();
            tabTotal++;
      });
      var newWidth = Math.floor((totalWidth / tabTotal) - mySpace);
      $(mySelector).not(mySelector + ' li').each(function(e) {
            $(this).width($(this).width() + newWidth);
            remainingWidth -= ($(this).width() + mySpace);
            if (e == (tabTotal - 1)) {
                  $(this).width($(this).width() + remainingWidth);
            }
      });
	  //$('#mainnav a:last').css('border-right','none');
}
function FG_fixfloats(selector){
  lastParent = 0;
  galleryitems = $(selector);
  galleryitems.each(function(i){
    if(this.parentNode != lastParent){
      lastTop = 0;
      rowHeight = 0;
      rowStart = i;
      lastParent = this.parentNode;
    }
    this.style.height = "auto";
    this.style.clear="none";
    if(this.offsetTop != lastTop){
      this.style.clear="left";
      rowHeight = this.offsetTop - lastTop - (this.style.marginTop + this.style.marginBottom);
      for(j=rowStart;j<i;j++) {
        galleryitems.get(j).style.height = rowHeight+"px";
      }
      lastTop = this.offsetTop;
      rowStart = i;
    } 
  });
}




$(document).ready(function(){
	navSpace(960, 0, '#topNav li');
	FG_fixfloats('.middleCallout');
	
	$('table.searchTable > tbody > tr > td').css({
		'border-bottom': '1px solid #EAEAEA'
	});
	
});

$(function() {
    $('.slopybanner').cycle(
	$.fn.cycle.defaults = { 
    timeout:       4000,  // milliseconds between slide transitions (0 to disable auto advance) 
    speed:         1000,  // speed of the transition (any valid fx speed value) 
    next:          null,  // id of element to use as click trigger for next slide 
    prev:          null,  // id of element to use as click trigger for previous slide 
    before:        null,  // transition callback (scope set to element to be shown) 
    after:         null,  // transition callback (scope set to element that was shown) 
    height:       'auto', // container height 
    sync:          1,     // true if in/out transitions should occur simultaneously 
    fit:           0,     // force slides to fit container 
    pause:         1,     // true to enable "pause on hover" 
    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative) 
    slideExpr:     null   // expression for selecting slides (if something other than all children is required) 
}
	);
	
});

$(function() {
    $('.slideshow').cycle(
	$.fn.cycle.defaults = { 
    timeout:       6000,  // milliseconds between slide transitions (0 to disable auto advance) 
    speed:         1000,  // speed of the transition (any valid fx speed value) 
    next:          null,  // id of element to use as click trigger for next slide 
    prev:          null,  // id of element to use as click trigger for previous slide 
    before:        null,  // transition callback (scope set to element to be shown) 
    after:         null,  // transition callback (scope set to element that was shown) 
    height:       'auto', // container height 
    sync:          1,     // true if in/out transitions should occur simultaneously 
    fit:           0,     // force slides to fit container 
    pause:         0,     // true to enable "pause on hover" 
    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative) 
    slideExpr:     null   // expression for selecting slides (if something other than all children is required) 
});
});






