/*function equalHeight(group) {
   tallest = 0;
   group.each(function() {
      thisHeight = $(this).height();
      if(thisHeight > tallest) {
         tallest = thisHeight;
      }
   });
   group.height(tallest);
}

$(document).ready(function() {
   equalHeight($(".column"));
});*/



$(document).ready(function($) {
	$(".search-button").click(function(){
	if ($("#search").is(":hidden")){
		$("#search").slideDown("slow");
    
    } else {
    	$("#search").slideUp("slow");
    	}
	});
	
});


$(document).ready(function($) {
       $('#accordion dd').hide();
       $('#accordion dt a').click(function(){
               $('#accordion dd').slideUp();
               $(this).parent().next().slideDown();
               return false;
       });
});

  $(function(){
    $('.zebra li:even').addClass('even');
  });



$(function() {
	$("#menu").megaMenu('hover_fade');
});



    $(function () {
     
         $('div.notify marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
    });
    
    
//$(document).ready(function() {
	//$('#notification').hide();
	//$('#toggler').click(function(){
	//$('div.showhide,#notification').toggle();
  // });
 //});
 
 
 
 $(document).ready(function() {
        $("#carousel").featureCarousel({
          autoPlay: 0,
          trackerIndividual: false,
          trackerSummation: false,
          autoPlay: 2500
        });
      });
      
      	$(document).ready(function() {
        $('#yourSliderId').DDSlider({
		nextSlide: '.slider_arrow_right',
		prevSlide: '.slider_arrow_left',
		selector: '.slider_selector'
		});
        });
        
        jQuery(function($){
		$('#yourImageID').smoothZoom({
			width: 880,
			height: 309,
			zoom_OUT_TO_FIT: 'NO'
		});
	});
	
	Shadowbox.init({
    overlayOpacity: 0.6
	});
    
/*------------------- Randomize ----------------------- */
  
function randomizeContent(classname){
var contents=randomizeContent.collectElementbyClass(classname)
contents.text.sort(function() {return 0.5 - Math.random();})
var tbodyref=contents.ref[0].tagName=="TR"? contents.ref[0].parentNode : new Object()
for (var i=0; i<contents.ref.length; i++){
if (tbodyref.moveRow) //if IE
tbodyref.moveRow(0, Math.round(Math.random()*(tbodyref.rows.length-1)))
else
contents.ref[i].innerHTML=contents.text[i]
contents.ref[i].style.visibility="visible"
}
}

randomizeContent.collectElementbyClass=function(classname){ //return two arrays containing elements with specified classname, plus their innerHTML content
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
var contentobj=new Object()
contentobj.ref=new Array() //array containing references to the participating contents
contentobj.text=new Array() //array containing participating contents' contents (innerHTML property)
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (var i=0; i<alltags.length; i++){
if (typeof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1){
contentobj.ref[contentobj.ref.length]=alltags[i]
contentobj.text[contentobj.text.length]=alltags[i].innerHTML
}
}
return contentobj
}
    

