var bildArray=new Array(1,2,3,4,5,6,7,8,9,10);
function bild(nummer){
	if(document.getElementById)
	for (a=0;a<bildArray.length;a++){
		if(bildArray[a]!=nummer){
			document.getElementById("bild"+bildArray[a]).style.display = "none";
		}else{
			document.getElementById("bild"+nummer).style.display = "block";
		}
	}
	return false;
}
jQuery(document).ready(function() {
	$('#bookmarkIt,#popupClose').click(function() {
												 
    $('#popupBookmark,#popupClose').toggle(); 
}); 
$('#popupBookmark').bookmark(     {compact: true, addEmail: true, addFavorite: true});
	
	
	//destroy the countdown befor ajax load jk
jQuery(".subnav_ajax").each(function(){
			jQuery(this).click(function(){
										if(document.getElementById("countdown_product_1")){
	jQuery('#countdown_product_1').countdown('destroy');
										};
									  });									 
									 });



do_hover();


jQuery('#categories_container').accordion({

  header: '.title',

  selectedClass:'title_active',

  event: 'click',

  autoheight: false,

  active: false,

  animated:'firstclose',

  alwaysOpen:true});


jQuery(".subnav_ajax").ajaxContent({target:'#ajax_putin',loaderType:'img',loadingMsg:'images/loading.gif',returning:'true'});
do_ship_link();

});

function do_ship_link(){
jQuery(".ship_link").click(function(){

window.open(jQuery(this).attr('href'),'popup','toolbar=0, scrollbars=yes, resizable=yes, height=720, width=750');

return false;});	
}

function do_hover(){
jQuery(".hover_effect").each(function(){
jQuery(this).hover(function(){
jQuery(this).removeClass('hover_effect');
jQuery(this).addClass('hover_bg');
var thissrc = jQuery(this).find('.small_view_product').attr('src');
var replacedsrc = thissrc.replace('small_view_product','small_view_product_hover');
jQuery(this).find('.small_view_product').attr('src',replacedsrc);

},function(){
jQuery(this).removeClass('hover_bg');
jQuery(this).addClass('hover_effect');
var thissrc = jQuery(this).find('.small_view_product').attr('src');
var replacedsrc = thissrc.replace('small_view_product_hover','small_view_product');
jQuery(this).find('.small_view_product').attr('src',replacedsrc);
})
});

jQuery(".hover_effect_small").each(function(){
jQuery(this).hover(function(){
jQuery(this).removeClass('hover_effect_small');
jQuery(this).addClass('hover_bg_small');


},function(){
jQuery(this).removeClass('hover_bg_small');
jQuery(this).addClass('hover_effect_small');
})
});	
}