$(document).ready(function() {
     
  /*
  $('.mwshop_item_content .mwshop_buy_container').find('div').css({ 'display':'none' });
  $('.mwshop_item_content .mwshop_buy_combo').find('.mwshop_buythis').addClass('thickbox');
  */

  $('.delivery_restrict_icon').each(function() {
     $(this).click( function(){
        alert( $(this).attr('title') );
     });
  });
  
  $('.mwshop_item_content form').parent().each(function() {
  
    var selectos = $(this).find('select').length;
    
    if(selectos>0){  
      
      //$(this).css({ 'display':'none' });
      var NewId = $(this).attr('id');
      var MyButtonUse = '<div class="mwshop_buy_combo"><input type="submit" class="mwshop_buythis mwshop_buythis_fake" value="KOUPIT" title="KOUPIT" /> <span class="vvv" title="Tento produkt obsahuje varianty" onclick="alert(\'Tento produkt obsahuje varianty\');">V</span></div>';
      $(this).after(MyButtonUse);
      $(this).find('.mwshop_buy_container div').css({ 'display':'none' }); 
      $(this).find('.mwshop_buy_combo').css({ 'display':'none' }); 
      
      var MyButton = $(this).next().find('.mwshop_buythis_fake'); 
      
      MyButton.addClass('thickbox');
      MyButton.attr( 'alt' , '#TB_inline?height=200&amp;width=300&amp;inlineId=' + NewId );
       
    }  
    
      
  });
  
});

function goinhistory(id,mtime){
	var obj=eval(id)==null||eval(id+".closed");
	if(!obj){eval(id+".history.go("+mtime+")");}
}

function onw(addr,windowname,params) { 
  window.open(addr,windowname,params);
}
   
function fillempty(el,text,action)
{
 var vid = document.getElementById(el);
if(action==1)
{ 
   if(vid.value.length<1 || vid.value==text)
    {
     vid.value = '';
    } 
    
 }else if(action == 0){
 
   if(vid.value.length<1)
    { 
     vid.value = text;
    } 
 }
}


