jQuery(document).ready(function() {
jQuery('#cycle_start').cycle({  fx:     'fade' ,direction: 'left',pause:   1,speed:   1000,timeout:5000,delay:-1000,cleartype:1,random:0});								
								
jQuery("div.title_nosub, div.title").each(function(){
		if(jQuery(this).hasClass('title')){
			jQuery("a" ,this).hover(function(){
								old_src = jQuery("img:first" ,this).attr("src");
								new_src = jQuery("img:first" ,this).attr("src").replace("nav","yes_aktive");
								old_src_last = jQuery("img:last" ,this).attr("src");
								new_src_last = jQuery("img:last" ,this).attr("src").replace("nav","yes_aktive");
								 jQuery("img:first" ,this).attr("src",new_src);
								 jQuery("img:last" ,this).attr("src",new_src_last);
										 },function(){
								if(!jQuery(this).parent().hasClass("title_active")){			 
								jQuery("img:first" ,this).attr("src",old_src);
								jQuery("img:last" ,this).attr("src",old_src_last);
								}
											 
											 });
		jQuery("a" ,this).click(
								function(){
									old_this_href = jQuery(this).attr("href");
								jQuery("div.title > a").each(function(){
									if(old_this_href == jQuery(this).attr("href")){
										if(!jQuery(this).parent().hasClass("title_active")){
								 new_src = jQuery("img:first" ,this).attr("src").replace("nav","yes_aktive");
								 new_src_last = jQuery("img:last" ,this).attr("src").replace("nav","yes_aktive");
								 jQuery("img:first" ,this).attr("src",new_src);
								 jQuery("img:last" ,this).attr("src",new_src_last);
										}
									}else{
								new_src = jQuery("img:first" ,this).attr("src").replace("yes_aktive","nav");
								new_src_last = jQuery("img:last" ,this).attr("src").replace("yes_aktive","nav");
								 jQuery("img:first" ,this).attr("src",new_src);
								 jQuery("img:last" ,this).attr("src",new_src_last);
									}
																				   
								});	
									
									} 
								 );
			
		}else{

		jQuery("a" ,this).hover(function(){
								old_src = jQuery("img:first" ,this).attr("src");
								new_src = jQuery("img:first" ,this).attr("src").replace("nav","yes_aktive");
								old_src_last = jQuery("img:last" ,this).attr("src");
								new_src_last = jQuery("img:last" ,this).attr("src").replace("nav","yes_aktive");
								 jQuery("img:first" ,this).attr("src",new_src);
								 jQuery("img:last" ,this).attr("src",new_src_last);
										 },function(){
											 
								jQuery("img:first" ,this).attr("src",old_src);	
								jQuery("img:last" ,this).attr("src",old_src_last);	
											 
											 });
		}
				
							});
								
jQuery("div.ersteebene , div.ersteebene_aktive").each(function(){
if(jQuery(this).hasClass('has_sub')){
	jQuery(this).next().next().hide();
	if(jQuery(this).hasClass('ersteebene_aktive')){
	jQuery(this).next().next().slideDown(300);
	aktive = jQuery("a",this);	
	}
	jQuery("a",this).click(function(){				
			old_this = jQuery(this);
			old_this_href = jQuery(this).attr("href");
			
			jQuery("div.ersteebene > a").each(function(){
																				 
			if(old_this_href == jQuery(this).attr("href")){
			if(!jQuery(this).parent().hasClass("ersteebene_active")){
			new_src = jQuery("img:first" ,this).attr("src").replace("nav","yes_aktive");
			new_src_last = jQuery("img:last" ,this).attr("src").replace("nav","yes_aktive");
			jQuery("img:first" ,this).attr("src",new_src);
			jQuery("img:last" ,this).attr("src",new_src_last);
			}
			}else{
			new_src = jQuery("img:first" ,this).attr("src").replace("yes_aktive","nav");
			new_src_last = jQuery("img:last" ,this).attr("src").replace("yes_aktive","nav");
			jQuery("img:first" ,this).attr("src",new_src);	
			jQuery("img:last" ,this).attr("src",new_src_last);	
			}
																				   
			});	
			
			
			if(typeof(aktive) != 'undefined'){
		jQuery("div.has_sub").each(function(){
										
											
								aktive.parent().next().next().slideUp(300,function(){do_it_down(old_this)});
								old_this.parent().addClass("ersteebene_active");
								aktive.parent().removeClass("ersteebene_active");
											});
			}else{
			old_this.parent().addClass("ersteebene_active");
			do_it_down(old_this);	
			}
			 function do_it_down(that){
								that.parent().next().next().slideDown(300);
								aktive = that;
								
 }					
		return false;
								});
	

}else{
	
}
				jQuery("a" ,this).hover(function(){
								old_src = jQuery("img:first" ,this).attr("src");
								new_src = jQuery("img:first" ,this).attr("src").replace("nav","yes_aktive");
								old_src_last = jQuery("img:last" ,this).attr("src");
								new_src_last = jQuery("img:last" ,this).attr("src").replace("nav","yes_aktive");
								 jQuery("img:first" ,this).attr("src",new_src);
								 jQuery("img:last" ,this).attr("src",new_src_last);
										 },function(){
								if(!jQuery(this).parent().hasClass("ersteebene_active")){			 
								jQuery("img:first" ,this).attr("src",old_src);
								jQuery("img:last" ,this).attr("src",old_src_last);
								}
											 
											 });
												  });

jQuery(".subnav_ajax").ajaxContent({target:'#putin',loaderType:'img',loadingMsg:'images/loading.gif',returning:'true'});
jQuery(".subnav2_ajax").ajaxContent({target:'#putin',loaderType:'img',loadingMsg:'images/loading.gif',returning:'false'});
jQuery('#categories_container').accordion({

  header: '.title',

  selectedClass:'title_active',

  event: 'click',

  autoheight: false,

  active: false,

  animated:'firstclose',

  alwaysOpen:true});



do_ship_link();

});


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";
		}
	}
}

function cyt_big(nummer){
	document.getElementById("big"+nummer).style.display = "block";
}
function cyt_hide_big(nummer){
	document.getElementById("big"+nummer).style.display = "none";
}

function CreateBookmarkLink() {

  title = "UrbanKidsWear"; 

  url = "http://www.urbankidswear.de"; 

  if (window.sidebar) { // Mozilla Firefox Bookmark	

  window.sidebar.addPanel(title, url,"");

  } else if( window.external ) { // IE Favorite

  window.external.AddFavorite( url, title);

  }	else { 

      alert("Diese Funktion wird leider von ihrem Browser nicht unterstützt");}

  };
  
  function doAjaxSubmit()
{
var options = { 
        target:        '#putin',
		beforeSubmit:  function(){jQuery("#putin").html('<div class="ajax_loading"><img src="images/loading.gif"/>&nbsp;</div>');},
		data: ['ajax'],  
        success:       function() {do_ship_link();}  
		
		}
		jQuery('#use_filters').ajaxSubmit(options); 
		return false;
}
 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;}); 
 }
 
 var submitter = null;
function submitFunction() {
   submitter = 1;
   }