 $(window).load(function() {

       $('.nivo-controlNav a').first().addClass('first');
       $('.nivo-controlNav a').last().addClass('last');
       
       var ileban = $('.nivo-controlNav a').length;

       if (ileban<2)
       $('.nivo-controlNav').hide();
       
       
       Cufon.replace('.nivo-controlNav a', {fontFamily: 'Museo 500' });
       Cufon.replace('.ltop p', {fontFamily: 'Museo 500' });
       Cufon.replace('.cat-desc-bg h3', {fontFamily: 'Museo 700' });
       Cufon.replace('.product-list h2', {fontFamily: 'Museo 700' });
       Cufon.replace('.account-tit h3', {fontFamily: 'Museo 500' });
       Cufon.replace('.step-2-div h2', {fontFamily: 'Museo 500' }); 
       Cufon.replace('.reccomend-top p', {fontFamily: 'Museo 500' }); 

		
        $('.item-cat a.cat-image img').click(function() {
          $('.green-category').hide();
          $('.green-border').hide();
		  $('.modal').show();
          $('.item-cat').removeClass('noopacity');
		  $('.item-cat').css('zIndex', 8000);
		  
		  $(this).parent().parent().css('zIndex', 9000);
          $(this).parent().parent().children('div').fadeIn('fast');
          $(this).parent().parent().addClass('noopacity');
        });
		
        $('.pnb-area').css('zIndex', 8000);
		$('.categories-area').css('zIndex', 9000);
		
        $('.closecat').click(function() {
          $('.green-category').hide();
          $('.green-border').hide();
		  $('.modal').hide();
          $('.item-cat').removeClass('noopacity');
        });

		$('.modal').click(function() {
          $('.green-category').hide();
          $('.green-border').hide();
		  $(this).hide();
          $('.item-cat').removeClass('noopacity');
        });
		
        jQuery.fn.anchorAnimate = function(settings) {
                settings = jQuery.extend({
                        speed : 500
                }, settings);	
                
                return this.each(function(){
                        var caller = this
                        $(caller).click(function (event) {	
                                event.preventDefault()
                                var locationHref = window.location.href
                                var elementClick = $(caller).attr("href")
                                
                                var destination = $(elementClick).offset().top;
                                $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
                                        window.location.hash = elementClick
                                });
                                return false;
                        })
                })
        }
        
        if ( $.browser.opera )
        {}
        else
        {
               
                $(".in-card-list a").anchorAnimate();
                $(".rate-now").anchorAnimate();
                
                
                
        }
        

        $('.main-trigger').click(function() {
                $('.main-trigger').parent().removeClass('activetab');
                $(this).parent().addClass('activetab');
                $('.pnb-inside').hide();
                var linkem = $(this).attr('rel');
                $(linkem).show();
                
                
        });
        
        for(var nr=3;nr<32;nr+=4)
        $(".subcategories-list ul li").eq(nr).addClass("nomargin");
        
        
       

        $('.in-card-list a').click(function() {
          $('.inside-tab').hide();
                var linkem = $(this).attr('rel');    
                $(linkem).show();
                $('.in-card-list li span').remove();
                $('.in-card-list li').removeClass('active');
                $(this).parent().addClass('active');
                $(this).parent().append("<span class='rightab'></span>");
                $(this).parent().prepend("<span class='leftab'></span>");

        });
        
        $(".rate-now").click(function() {
                $('.inside-tab').hide();    
                $('#opinietab').show();
                $('.in-card-list li span').remove();
                $('.in-card-list li').removeClass('active');
                $('.in-card-list a.ratetab').parent().addClass('active');
                $('.in-card-list a.ratetab').parent().append("<span class='rightab'></span>");
                $('.in-card-list a.ratetab').parent().prepend("<span class='leftab'></span>");

        });
        

		
		
         for(var a=2;a<20;a+=3)
		 $('.personal-data:eq('+a+')').css("border-right","0px");

        
    });
    
