﻿

       //Cufon replace
Cufon.replace('h1,.lang,h2,h3, .headerFooterMenuButton, .headerFooterMenuButtonCurrent, .iconText, .ContactPersonName, .ContactMailformVersal', { fontFamily: 'Rockwell' });

       //Fade-effekt
        $(document).ready(function () {$('body').fadeIn("slow");});
       
       //Fancybox
       $(document).ready(function() {
            $("a[rel=produktbilder]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'outside',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">' + title + '</span>';
				}
			});
       });



        //Formulär
        function flip() 
        {
            $('#mailformular').fadeOut('slow');
            $('#submit').fadeIn('slow');
            $(".ContactMailformButton").fadeOut('slow');
        }
        $(function () 
        {
            $('input[type=text]').focus(function () {
                if ($(this).val() == 'Ange ditt namn') $(this).val('');
                if ($(this).val() == 'Du måste ange ditt namn!') $(this).val('');
                if ($(this).val() == 'Ange ditt företag') $(this).val('');
                if ($(this).val() == 'Du måste ange ditt företag!') $(this).val('');
                if ($(this).val() == 'Ange ditt telefonnummer') $(this).val('');
                if ($(this).val() == 'Du måste ange ditt telefonnummer!') $(this).val('');
                if($(this).val() == 'Felaktig epost!') $(this).val('');
                if ($(this).val() == 'Ange din epostadress') $(this).val('');
                if ($(this).val() == 'Du måste ange din epost!') $(this).val('');
                if ($(this).val() == 'Enter your name here') $(this).val('');
                if ($(this).val() == 'You have to enter a name!') $(this).val('');
                if ($(this).val() == 'Enter your company here') $(this).val('');
                if ($(this).val() == 'You have to enter a company!') $(this).val('');
                if ($(this).val() == 'Enter your phone number here') $(this).val('');
                if ($(this).val() == 'You have to enter a phone number!') $(this).val('');
                if($(this).val() == 'Bad e-mail address') $(this).val('');
                if ($(this).val() == 'Enter your e-mail address here') $(this).val('');
                if ($(this).val() == 'You have to enter a e-mail address!') $(this).val('');    
            });
        });

        $(function () {
            $('#txtMeddelande').focus(function () {
                if ($(this).val() == 'Ange ditt meddelande här') $(this).val('');
                if ($(this).val() == 'Du måste ange ett meddelande!') $(this).val('');  
                if ($(this).val() == 'Enter your message here') $(this).val('');
                if ($(this).val() == 'You have to enter a message!') $(this).val(''); 
            });
        });


      
