function showEmail(id)
{
	document.getElementById(id).style.display = 'block';
}

function hideEmail(id)
{
	document.getElementById(id).style.display = 'none';
}

jQuery(window).load(function() {

jQuery.fn.fadeToggle = function(speed, easing, callback) 
{
	return this.animate({opacity: 'toggle'}, speed, easing, callback);
}; 

jQuery.fn.pause = function(duration) {
	$(this).animate({ dummy: 1 }, duration);
	return this;
};
jQuery(".heading").click(function (){										
	jQuery(this).parent('.bottom').children('.first').slideDown('slow');
})

jQuery(".main_button").click(function (){										
	jQuery(this).parent('.last').parent('.first').slideUp('slow');
})				
jQuery(".first li a").click(function (){
	if(jQuery(this).is('.plus')){ 
	jQuery(this).parent('li').children('ul').slideDown('slow');

	jQuery(this).removeClass('plus');
	jQuery(this).addClass('minus');

}
else { 

	jQuery(this).removeClass('minus');
	if(jQuery(this).is('.main_button')){ 
	
	}
	else
	{
		jQuery(this).addClass('plus');
	}
	
	jQuery(this).parent('li').children('ul').slideUp('slow');
}
})
jQuery.fn.pause = function(duration) {
    jQuery(this).animate({ dummy: 1 }, duration);
    return this;
};
jQuery("#form_area").hover(
		function () {
			  var the_value;
              the_value = jQuery('#form_area input:radio:checked').val();
              if(the_value == null)jQuery('#tooltipshow').fadeIn("normal");
	          },
	     function () {
	         jQuery('#tooltipshow').fadeOut("normal");
	        });


jQuery("#form_area input:radio").change(function(){
   // your code here 
   jQuery('#tooltipshow').fadeOut("normal");
   jQuery('#loader_form').show('fast');
   jQuery('#form_area').hide('fast');
      jQuery('#loader_form').pause(1000).hide('fast');
	   jQuery('#form_area').pause(1000).show('fast');
	  
   
});
jQuery('#emailPopLayer').click(function() {
										jQuery('#email_show').show('fast');
										jQuery('#email_loader').show('fast');
										jQuery('#email_form').pause(1000).show('fast');
										jQuery('#email_loader').pause(1000).hide('fast');
										 })

jQuery('#emailsent').click(function() {
										jQuery('#email_loader').show('fast');
										jQuery('#email_form').hide('fast');	
										jQuery('#email_loader').pause(1000).hide('fast');
										jQuery('#email_thanks').pause(1000).show('fast');
										//jQuery('#email_thanks').pause(1000).hide('fast');
										 })

jQuery('#instock_submit').click(function() {
										jQuery('#email_instock_form').hide('fast');	
										jQuery('#email_instock_loader').hide('fast');
										jQuery('#email_instock_thanks').show('fast');
										//jQuery('#email_thanks').pause(1000).hide('fast');
										 })
jQuery('.closeform').click(function() {									
									jQuery('#email_loader').pause(1000).hide('fast');
									jQuery('#email_thanks').pause(1000).hide('fast');
									jQuery('#email_form').pause(1000).hide('fast');
									jQuery('#email_show').hide();
									
									})
				$("#select1").click(function(){
				$("#us").show();
				$('#canada').hide();
				$('#apo').hide();
				$('#international').hide();	
				})
					
				$("#select2").click(function(){
				$("#us").hide();
				$('#canada').show();
				$('#apo').hide();
				$('#international').hide();	
				})
					$("#select3").click(function(){
				$("#us").hide();
				$('#canada').hide();
				$('#apo').show();
				$('#international').hide();	
				})
					$("#select4").click(function(){
				$("#us").hide();
				$('#canada').hide();
				$('#apo').hide();
				$('#international').show();	
				})	
/**jQuery('#emailbottom').click(function() {
									var regEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
									var boolFocus = false;
									jQuery('#first').show('fast');
									jQuery('#first').pause(1000).hide('fast');
									var EmailVal = jQuery('#emailtext').val();									
									if(EmailVal == 'Enter your e-mail' || EmailVal == '')
									{
										if(!boolFocus)
										{
											boolFocus = true;
											
										}
									}
									else if(!regEmail.test(EmailVal))
									{
										if(!boolFocus)
										{
											boolFocus = true;
											
										}
									}
									if(boolFocus)
									{
										jQuery('#second').pause(1000).hide('fast');
										jQuery('#second').pause(1000).show('fast');
										jQuery('#second').pause(1000).hide('fast');
										
									}
									else
									{
										jQuery('#third').pause(1000).hide('fast');
										jQuery('#third').pause(1000).show('fast');
										jQuery('#third').pause(1000).hide('fast');
										
									}
									
									})
*/
/************************payment_method_main****************************/
jQuery("ul li .option:radio").each(function(index){
											$(this).click(function(){
																   $(".saved_card .form_row02").hide();
																   $(".saved_card .form_row02:eq("+index+")").show();
																  // hidecode(index);
																   });
											})
/*jQuery('#ncc_link').click(function(){
									   if(jQuery(this).is('.active')){
									    jQuery('#savedCard').hide();
										//jQuery(this).parent('small').parent('fieldset').parent('form').parent('.head').parent('.content_area').children('.saved_card').hide();
									    jQuery(this).removeClass('active');
									   }
									   else
									   {
										jQuery('#savedCard').show();
										//jQuery(this).parent('small').parent('fieldset').parent('form').parent('.head').parent('.content_area').children('.saved_card').show();
									    jQuery(this).addClass('active');
									   }
									   })
*/
jQuery('#saved03').click(function(){
									   jQuery('#saved02').attr("checked", "");
									   jQuery('#saved1').attr("checked", "");
									   jQuery("#wc").hide();
									   jQuery('#savedCard').show();
									   jQuery("#ncc").hide();
									 jQuery("#with_new").css("background-position", "0 bottom");
									 jQuery("#with_saved").css("background-position", "-12px bottom");
									 jQuery("#with_check").css("background-position", "0 bottom");									   });
jQuery('#saved02').click(function(){
									 jQuery("#saved03").attr("checked", "");
									 jQuery("#saved02").attr("checked", "");
									 jQuery("#wc").show();
									 jQuery('#savedCard').hide();
									 jQuery("#ncc").hide();
									 jQuery("#with_new").css("background-position", "0 bottom");
									 jQuery("#with_saved").css("background-position", "0 bottom");
									 jQuery("#with_check").css("background-position", "-12px bottom");
									  });


jQuery('#saved1').click(function(){
									 jQuery("#saved03").attr("checked", "");
									 jQuery("#saved02").attr("checked", "");
									 jQuery("#wc").hide();
									 jQuery('#savedCard').hide();
									 jQuery("#ncc").show();
									 jQuery("#with_new").css("background-position", "-12px bottom");
									 jQuery("#with_saved").css("background-position", "0 bottom");
									 jQuery("#with_check").css("background-position", "0 bottom");
									  });

jQuery("#mr21").click(function(){
							   jQuery("#mr41").attr("checked", "");
							    jQuery("#mr21").attr("checked", "checked");
								jQuery(".left_bg").hide();
								jQuery(".right_bg").show();
								document.getElementById('state05').diasabled = true;
							   })

jQuery("#mr41").click(function(){
							   jQuery("#mr41").attr("checked", "checked");
							    jQuery("#mr21").attr("checked", "");
								
								jQuery(".left_bg").show();
								jQuery(".right_bg").hide();
									document.getElementById('state05').diasabled = true;
							   })


jQuery("#mr2").click(function(){
							   jQuery("#mr4").attr("checked", "");
							    jQuery("#mr2").attr("checked", "checked");
								jQuery(".left_bg2").hide();
								jQuery(".right_bg2").show();
							   })

jQuery("#mr4").click(function(){
							   jQuery("#mr4").attr("checked", "checked");
							    jQuery("#mr2").attr("checked", "");
								jQuery(".left_bg2").show();
								jQuery(".right_bg2").hide();
							   })

/*jQuery('.minuspaymentnew').click(function(){
									if(jQuery(this).is('.active')){
									   jQuery("#ncc").hide();
									   //jQuery(this).parent('small').parent('.head').parent('.content_area').children('.credit_card').hide();
									   jQuery(this).removeClass('active');
											}
											else
											{
										jQuery("#ncc").show();
										//jQuery(this).parent('small').parent('.head').parent('.content_area').children('.credit_card').show();
									   jQuery(this).addClass('active');
												
											}
									   })
jQuery('.minuspaymentchk').click(function(){
									if(jQuery(this).is('.active')){
									   jQuery("#wc").hide();
									   //jQuery(this).parent('small').parent('.head').parent('.content_area').children('.credit_card').hide();
									   jQuery(this).removeClass('active');
											}
											else
											{
										jQuery("#wc").show();
										//jQuery(this).parent('small').parent('.head').parent('.content_area').children('.credit_card').show();
									   jQuery(this).addClass('active');
												
											}
									   })
*/

jQuery('.find_cc_link').click(function(){
    window.open(this.href,'cc_info','width=670,height=600,toolbar=yes,location=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes');
    return false;
});
/**********************************My Wishlist***************************************/

jQuery('.plus').click(function(){
									   if(jQuery(this).is('.active')){
									    jQuery(this).parent('.flex_box').children('.box_outer').hide();
									    jQuery(this).removeClass('active');
									   }
									   else
									   {
										     jQuery(this).parent('.flex_box').children('.box_outer').show();
									    jQuery(this).addClass('active');
									   }
									   })



jQuery("#price_second li a").hover(
		function () {
			jQuery(this).addClass('across');
	          },
	     function () {
	         jQuery(this).removeClass("across");
	        });




jQuery('#wishlistPopLayer').click(function() {
										jQuery('#wishlistContainer').show('fast');
										jQuery('#wishlistLoader').show('fast').pause(6000).hide('fast');
										jQuery('#wishlistContent').show('fast').pause(6000).hide('fast');
																	
										jQuery('#wishlistSelect').pause(6000).show('fast').pause(6000).hide('fast')
										jQuery('#wishlistForm').pause(6000).show('fast').pause(6000).hide('fast');
										jQuery('#wishlistThanks').pause(7000).show('fast');
										
										 })

jQuery('#wishlistThanks ul li small a').click(function()
													   {
														 jQuery('#wishlistContainer').hide();  
														   })


jQuery("#mygalleryNext .belt .panel a").click( function(){
	var j=1;var current = 1;
	jQuery("#mygalleryNext .belt .panel a").each(function (i) {
	jQuery(this).removeClass('active') ;
	j = i;
	});
	jQuery(this).addClass('active');
	jQuery("#mygalleryNext .belt .panel a").each(function (k)
	{
	if(jQuery(this).is('.active')){
	current = k;
	}
	});															
	document.getElementById('alldata').innerHTML = 'Image '+ (current+1) +' of '+(j+1); 
	})
jQuery('#popup_cart').hide('fast');
jQuery('#popup_cat_subcat').hide('fast');
//jQuery('#pop_up_banner_big').hide('fast');
//jQuery('#banner_big').css('cursor','pointer');


jQuery('#minusflex').click(function(){
									if(jQuery(this).is('.minus')){
										jQuery(this).parent('.flex_box').children('.carousel').hide('fast');
										jQuery(this).removeClass('minus');
										jQuery(this).addClass('plus');
									}
									else
									{
										jQuery(this).parent('.flex_box').children('.carousel').show('fast');
										jQuery(this).removeClass('plus');
										jQuery(this).addClass('minus');
									}
									})
iniHide();
jQuery('#pane_8_holder').hide();
/*jQuery('#banner_big').click( function(){
						 if( jQuery('#pop_up_banner_big').is(':visible') ) {
							 	jQuery('#pop_up_banner_big').hide();
}
else {
	jQuery('#pop_up_banner_big').show();
}

 })
*/

 });


function ShowHide(ref){
	
			document.getElementById('overview').className = '';
			document.getElementById('details').className = '';
			document.getElementById('customer').className = '';
			document.getElementById('contact').className = '';			
			document.getElementById(ref).className = 'current';
			document.getElementById('overview1').style.display ='none';
			document.getElementById('details1').style.display ='none';
			document.getElementById('customer1').style.display ='none';
			document.getElementById('contact1').style.display ='none';
			document.getElementById(ref+'1').style.display ='block';
}
function ShowHideInner(ref){
			document.getElementById('overview').className = '';
			document.getElementById('contact').className = '';			
			document.getElementById(ref).className = 'current';
			document.getElementById('overview1').style.display ='none';
			document.getElementById('contact1').style.display ='none';
			document.getElementById(ref+'1').style.display ='block';
}

	
	function hideCompare(classRef,showRef){
	
	document.getElementById(classRef).className = 'cat_box';
	document.getElementById(showRef).style.display ='none';
	}
	
		
	function changeTab(id)
	{
		document.getElementById('over').className = '';
		document.getElementById('con').className = '';
		
		if(id == 'con')
		{
			document.getElementById('pane3_holder').style.display = 'none';
		    document.getElementById('pane_8_holder').style.display = 'block';	
		}
		else
		{
			document.getElementById('pane_8_holder').style.display = 'none';
		    document.getElementById('pane3_holder').style.display = 'block';	
		}
		document.getElementById(id).className = 'current';
		
	}
