/* Input Field Clear */
$(document).ready(function() {

			//$('input[type="text"]').addClass("idleField");
       		$('input.searchOptionInput').click(function() {
       			//$(this).removeClass("idleField").addClass("focusField");
    		    if (this.value == this.defaultValue){ 
    		    	this.value = '';
				}
				if(this.value != this.defaultValue){
	    			this.select();
	    		}
    		});
    		$('input.searchOptionInput').blur(function() {
    			//$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});
});	

/* Help Expand Collapse */
$(document).ready(function(){
						   
	//Hide (Collapse) the toggle containers on load
	$(".helpyou").hide(); 
	
	//Switch the "Open" and "Close" state per click
	$("div.mywehelp a").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$(".mywehelp a").click(function(){
		$(".helpyou").slideToggle("slow");
	});

});

/* Our Product Nested Tabs */

jQuery.fn.tabs = function () { 
  return this.each(function () { 
    var ul = jQuery(this); 
 
 
 
    ul.find('a[href^=#]').each(function (i) { 
      var tablink = jQuery(this); 
 
      if (i) { 
        jQuery(tablink.attr('href')).hide(); 
 
      } 
      else { 
        tablink.addClass('selected'); 
      } 
 
      tablink.click(function () { 
        jQuery(ul.find('a.selected').removeClass('selected').attr('href')).hide(); 
        jQuery(tablink.addClass('selected').attr('href')).show(); 
        if(tablink.attr('rel')){ 
          $("#tab-preloader").show(); 
          $.ajax( 
            { 
              url: tablink.attr('rel'), 
              cache: false, 
              success: function(message) 
              { 
              jQuery(tablink.attr('href')).empty().append(message); 
              $("#tab-preloader").hide(); 
              } 
            }); 
        }; 
 
        return false; 
      }); 
    }); 
  }); 
};

jQuery(document).ready(function(){ 
 
$('.OurProductTab ul').tabs(); 
});

/* Product Page Product Tab */
$(function () {    
	var tabContainers1 = $('.DescriptionTab > div.tabContainer div.s1');  
      
	$('.DescriptionTab ul li a').click(function () {        
		tabContainers1.hide().filter(this.hash).fadeIn('normal').show();                
		$('.DescriptionTab ul li').removeClass('selected');        
		$(this).parent().addClass('selected');    
	return false;    
}).filter(':first').click();
//}).filter(':first').click();
});

/* Download Form Tab */
$(function () {    
	var tabContainers1 = $('.DownloadFormTab > div.tabContainer div.s1');
	
	$('.DownloadFormTab ul li a').click(function () {        
		tabContainers1.hide().filter(this.hash).fadeIn('normal').show();                
		$('.DownloadFormTab ul li').removeClass('selected');        
		$(this).parent().addClass('selected');    
	return false;    
}).filter(':first').click();
});




