(function($) {	
    	$(document).ready(function(){
   
        $.requeststorage = new Array();
   
        $('.hint').show();
	      $('.hint').mouseover(function(){
	    	  $(this).css("cursor", "pointer");
	      });
	      $('.hint').click(function(){ 
	         
	         var hint = this.id.replace('hintik', '');
	         var title = $(this).parent().text().replace(/^\s*/, '').replace(/\s*$/, '');
           
	         if($(this).parents('.domains-pricelist-item1').length > 0)
	         {
            var ajaxurl = '/include_/help.php?id_helpu=' + title.replace(/\s*\-.*$/, '');
            if(this.src.indexOf('question-mark-red') !== -1) ajaxurl += '&restrikcia=1';          
           }
           else
           {                                         
            var ajaxurl = '/include_/voc.php?s=' + hint;
           }
	      	    	  
	    	  var datapost = null;
	    	  $.requeststorage.push($.get(ajaxurl,
					datapost, 
					function(response, status, xhr) {	
						
	    		  		var content = $(response).filter('#info').html();
						if($('#hintinfo').length === 0)
							$('[id="hintik'+hint+'"]').after('<div id="hintinfo" class="inactive"></div>');
							
						$('#hintinfo').html(content);
						if($('#hintinfo').hasClass('ui-dialog-content')){
              $( "#hintinfo" ).dialog( "option", "title", title );							
						}else
							$('#hintinfo').dialog({
								minWidth: 300,
								resizable: false,
								modal: false,
								stack: false,
								draggable: true,
								show: 'size',
								title: title,
								zIndex: 999
							}); 
						$('#hintinfo').dialog('open');
						
					}, 
					'html'));
	    	  
	      });
       	
       	
	      $('.hosting-detail-table-item-unique').not(':first').removeClass('hosting-detail-table-item-unique').addClass('hosting-detail-table-item-unique1').hide();
	      $('.hosting-detail-table-item-unique1').first().before('<div class="hosting-detail-table-item hosting-detail-table-item-unique"><div class="hosting-detail-table-item-left"><div>Viac</div></div></div>');
	        
	      
       	$('.hosting-detail-table-item-unique').prepend('<div class="icon plus"></div>');
        $('.hosting-detail-table-item-unique').mouseover(function(){
	    	  $(this).css("cursor", "pointer");
	    });
        
        
    	$('.hosting-detail-table-item-unique').click(function() {
    		  $(this).find('.icon').toggleClass('plus minus');
    		  $(this).nextUntil('.hosting-detail-table-item-unique').toggle();    		  
      	}).nextUntil('.hosting-detail-table-item-unique').hide();
    		
    	
    	$('.hosting-detail-table-item-unique').first().click();	
    	});
})(jQuery);
