$().ready(function(){
				  // alert($('#test').height());
				  				  $('.hover_effect').live('mouseover',function(){$(this).addClass('hover_effect_add')});
								  $('.hover_effect').live('mouseout',function(){$(this).removeClass('hover_effect_add')});

				   do_check_highlight();
				   do_faq_link();
				   
				   
				   		$('.tagcloud_ajax').bind('click',function(){
								var checked_basename = check_ssl($(this).attr('href'));
								
								$.ajax({url:checked_basename,data:{ajax:'1'},dataType:'html',success:function(data){$('#putin_main').html(data);},beforeSend:function(){if($('#countdown_product_1').length){$('#countdown_product_1').countdown('destroy')};$('#putin_main').html('<div class="ajax_loading"><img src="images/loading.gif" alt="loading..." title="loading..." /></div>');}});
								return false;				
												});
						$('.subnav_ajax').bind('click',function(){
								var checked_basename = check_ssl($(this).attr('href'));
								
								$.ajax({url:checked_basename,data:{ajax:'1'},dataType:'html',success:function(data){$('#putin_main').html(data);},beforeSend:function(){if($('#countdown_product_1').length){$('#countdown_product_1').countdown('destroy')};$('#putin_main').html('<div class="ajax_loading"><img src="images/loading.gif" alt="loading..." title="loading..." /></div>');}});				
												});
						

						
						
				   });
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){
			$("#large"+bildArray[a]).hide();
		}else{
			$("#large"+nummer).show();
		}
	}
}



 function do_check_highlight(){
//var checked_basename = check_ssl(window.location.href);
//$.ajax({url:checked_basename,data:{ajax:'ajax_calls',what:'highlight'},type:'POST',dataType:'json',success:function(data){highlight_it(data)},beforeSend:function(){}});	
highlight_it();
 }
 
 function highlight_it(data){
	 var config = {    
     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
     interval: 300, // number = milliseconds for onMouseOver polling interval    
     over: function(){JT_show($(this));}, // function = onMouseOver callback (REQUIRED)    
     timeout: 500, // number = milliseconds delay before onMouseOut    
     out: function(){} // function = onMouseOut callback (REQUIRED)    
	};
	$(".highlight").hoverIntent(config);
	  $(".highlight").live('click',function(){
												JT_show($(this));
												return false;
												});
	  /*if(typeof(data.highlight)!='undefined'){
	 $.each(data.highlight, function(json_id,json_data){
  $('body').highlight(json_data.title,json_data.mod_id);
									 });
	  }*/
 }
  function check_ssl(mod_url){
 					// SSL mod
					if(typeof mod_url != 'undefined'){
					var mod_href = '';
					if(typeof mod_ajax_request != 'undefined'){
					var mod_href = mod_url.replace(mod_ajax_normal_server,mod_ajax_ssl_server)
					}else{
					var mod_href = mod_url;
					}
					return mod_href;
					}
 }
 
 function do_check_filters(mod_selected_form){
	// mod_selected_form.submit();
	var checked_basename = check_ssl($(mod_selected_form).attr('action'));
    var options = { 
		url:checked_basename,
		dataType:'html',
		data:{ajax:'1',get_what:'box_special_filters'},
        beforeSubmit:  function(){$('#box_special_filters').block({ message: 'loading...' });if($('#countdown_product_1').length){$('#countdown_product_1').countdown('destroy')};},  // pre-submit callback 
        success:       function(data){$('#box_special_filters').html(data);$('#box_special_filters').unblock();}   // post-submit callback 
    };
	    var options_main = { 
		url:checked_basename,
		dataType:'html',
		data:{ajax:'1'},
        beforeSubmit:  function(){$('#putin_main').html('<div class="ajax_loading"><img src="images/loading.gif" alt="loading..." title="loading..." /></div>');if($('#countdown_product_1').length){$('#countdown_product_1').countdown('destroy')};},  // pre-submit callback 
        success:       function(data){$('#putin_main').html(data);$('#putin_main').unblock()}   // post-submit callback 
    };
	
	$(mod_selected_form).ajaxSubmit(options);
	$(mod_selected_form).ajaxSubmit(options_main);
	return false;
 }
 
  function CYT_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.CYT_p) d.CYT_p=new Array();
    var i,j=d.CYT_p.length,a=CYT_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.CYT_p[j]=new Image; d.CYT_p[j++].src=a[i];}}
}

function CYT_swapImgRestore() { //v3.0
  var i,x,a=document.CYT_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function CYT_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=CYT_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function CYT_swapImage() { //v3.0
  var i,j=0,x,
  a=CYT_swapImage.arguments; 
  document.CYT_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
    if ((x=CYT_findObj(a[i]))!=null){
      document.CYT_sr[j++]=x; 
	  if(!x.oSrc) 
	    x.oSrc=x.src; x.src=a[i+2];
	}
}
 
 function do_faq_link(){
	 	$(".ship_link").live('click',function(){
 window.open($(this).attr('href'),'popup','toolbar=0, scrollbars=yes, resizable=yes, height=720, width=750');
return false;});
	 
	 
$(".faq_ajax").live('click',function(){
	var checked_basename = check_ssl($(this).attr('href'));
	var that = $(this);
	$.ajax({url:checked_basename,data:{ajax:'1'},type:'GET',dataType:'html',
		   success:function(data){
				$('#faq_ajax_input').html(data);
				  $("html").animate({ scrollTop: 0 }, 100);
				},
			beforeSend:function(){
				$('#faq_ajax_input').html('<div class="ajax_loading"><img src="images/loading.gif" alt="loading..." title="loading..." /></div>');
								}});		
		return false;
		});

}
 