﻿jQuery.noConflict();  
jQuery(document).ready(function() {   
          
    jQuery('.section').each(function(){
        jQuery(this).css('width', jQuery(window).width() + 'px');
    });
    jQuery('#holcar').css('width', jQuery(window).width() + 'px'); 
    
    jQuery('.left').css('width', (jQuery(window).width() - 945) / 2 + 'px');
    jQuery('.vliegtickets .left').css('width', (jQuery(window).width() - 966) / 2 + 'px'); 
    
    jQuery('#logo').css('left', (jQuery(window).width() - 945) / 2 + 'px');  
    jQuery('.menu ul').css('left', (jQuery(window).width() - 945) / 2 + 210 + 'px'); 
    
    var width = jQuery('.footer ul').width();
    if(945 - width > 0)
        jQuery('.footer ul').css('padding-left', (945 - width) / 2 + 'px');           

    if(898 - (jQuery(window).width() - 945) > 0)
    {
        jQuery('#sectiona').css('width', 898 - (jQuery(window).width() - 945) + 'px');   
        jQuery('#sectiona').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
        
        jQuery('#sectionb').css('width', 898 - (jQuery(window).width() - 945) + 'px');   
        jQuery('#sectionb').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    }

    if(904 - (jQuery(window).width() - 945) > 0)
    {
        jQuery('#sectionc').css('width', 904 - (jQuery(window).width() - 945) + 'px');   
        jQuery('#sectionc').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    }

    if(901 - (jQuery(window).width() - 966) > 0)
    {
        jQuery('#sectiond').css('width', 901 - (jQuery(window).width() - 966) + 'px');   
        jQuery('#sectiond').css('backgroundPosition', '-'+ ((jQuery(window).width() - 966) / 2) + 'px' + ' 0px');
        
        jQuery('#sectionf').css('width', 901 - (jQuery(window).width() - 966) + 'px');   
        jQuery('#sectionf').css('backgroundPosition', '-'+ ((jQuery(window).width() - 966) / 2) + 'px' + ' 0px');
    }

    if(899 - (jQuery(window).width() - 945) > 0)
    {
        jQuery('#sectione').css('width', 899 - (jQuery(window).width() - 945) + 'px');   
        jQuery('#sectione').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    }

    if(900 - (jQuery(window).width() - 945) > 0)
    {
        jQuery('#sectiong').css('width', 899 - (jQuery(window).width() - 945) + 'px');   
        jQuery('#sectiong').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    }

    jQuery('.right').css('width', (jQuery(window).width() - 945) / 2 + 'px');
    jQuery('.vliegtickets .right').css('width', (jQuery(window).width() - 966) / 2 + 'px'); 

    jQuery('#boverons').mouseover(function(){
        jQuery('#aover_ons').css('background', 'url(../images/over_ons.jpg) no-repeat');
    });
    
    jQuery('#boverons').mouseout(function(){
        jQuery('#aover_ons').css('background', 'none');
    });
    
    jQuery('#bteam').mouseover(function(){
        jQuery('#ateam').css('background', 'url(../images/team.jpg) no-repeat');
    });
    
    jQuery('#bteam').mouseout(function(){
        jQuery('#ateam').css('background', 'none');
    });
    
    jQuery('#bvliegtickets').mouseover(function(){
        jQuery('#avliegtickets').css('background', 'url(../images/vliegtickets.jpg) no-repeat');
    });
    
    jQuery('#bvliegtickets').mouseout(function(){
        jQuery('#avliegtickets').css('background', 'none');
    });
    
    jQuery('#bautoverhuur').mouseover(function(){
        jQuery('#aautoverhuur').css('background', 'url(../images/autoverhuur.jpg) no-repeat');
    });
    
    jQuery('#bautoverhuur').mouseout(function(){
        jQuery('#aautoverhuur').css('background', 'none');
    });
    
    jQuery('#bhotels').mouseover(function(){
        jQuery('#ahotels').css('background', 'url(../images/hotels.jpg) no-repeat');
    });
    
    jQuery('#bhotels').mouseout(function(){
        jQuery('#ahotels').css('background', 'none');
    });
    
    jQuery('#bverzekeringen').mouseover(function(){
        jQuery('#averzekeringen').css('background', 'url(../images/verzekeringen.jpg) no-repeat');
    });
    
    jQuery('#bverzekeringen').mouseout(function(){
        jQuery('#averzekeringen').css('background', 'none');
    });
    
    jQuery('#bcontact').mouseover(function(){
        jQuery('#acontact').css('background', 'url(../images/contact.jpg) no-repeat');
    });
    
    jQuery('#bcontact').mouseout(function(){
        jQuery('#acontact').css('background', 'none');
    });
    
    var section = window.location.href.split("#");    
    if (this.scrolling) this.scrolling.cancel();
    
    jQuery('.controls ul li a').each(function (){
        jQuery(this).removeClass('selected');
    });
    jQuery('#b' + section[1]).addClass('selected');  
    
    if(window.location.href.split("#")[1] == "vliegtickets" && jQuery("#vliegtickets-iframe").html() == "")
    {
        jQuery("#vliegtickets-iframe").html("<iframe src=\"http://www.amadeusepower.com/holcar/portals/holcar/default.aspx\" width=\"966\" height=\"600\">You need a Frames Capable browser to view this content.</iframe>");
    }
    
    if(window.location.href.split("#")[1] == "autoverhuur" && jQuery("#autoverhuur-iframe").html() == "")
    {
        jQuery("#autoverhuur-iframe").html("<iframe src=\"http://www.sunnycars.nl/booking/entry?ak=699366\" width=\"945\" height=\"700\" style=\"text-align:center;\">You need a Frames Capable browser to view this content.</iframe>");
    }
    
    if(window.location.href.split("#")[1] == "hotels" && jQuery("#hotels-iframe").html() == "")
    {
        jQuery("#hotels-iframe").html("<iframe src=\"http://www.travelstreet.com/hotelsv3/b2c.cfm?customernumber=20020712&localpath=/holidays/travelagents/hotelsv3_LITE/&changedlanguage=DU\" width=\"945\" height=\"600\">You need a Frames Capable browser to view this content.</iframe>");
    }
    
    if(window.location.href.split("#")[1] == "verzekeringen" && jQuery("#verzekeringen-iframe").html() == "")
    {
        jQuery("#verzekeringen-iframe").html("<iframe src=\"https://eol.europeesche.nl/ebc/initProductLijst.do?rek_courant_nummer=6064\" width=\"945\" height=\"600\">You need a Frames Capable browser to view this content.</iframe>");
    }
     
});

function changeContent(page)
{
    if(page == 1)
    {
jQuery('#members').html("<li><img src=\"images/tamar.jpg\" alt=\"\" /><p><span class=\"blue\">Tamar</span> - de multitasker<br /><br />Holcar Travel werd in 1985 opgericht door mijn moeder. Jaren geleden ‘sprong ik even bij’ en ging nooit meer weg. Een heerlijk vak waar ik inmiddels alle facetten van ken. Samen met ‘mijn specialisten zet ik alles in om onze klanten de hoogste kwaliteit en de beste service te bieden. Die personal touch en nét dat ene stapje extra, is de kracht van Holcar.<br /><br /> Ik heb zelf gereisd door Australië, Thailand, China, Aruba, Curaçao en vrijwel alle grote steden in de USA en Europa. Mijn droomreis? Met een camper door Canada.</p></li><li><img src=\"images/vania.jpg\" alt=\"\" /><p><span class=\"blue\">Vania</span> - de talenknobbel<br /><br /> Ik heb jaren ervaring in de reisbranche. Ik heb voor een bureau gewerkt gespecialiseerd in reizen naar Kroatië en voor een grote hotelketen. Ik spreek vloeiend Frans, Spaans en Portugees en dat komt bij mijn werk uitstekend van pas!<br /><br /> Mijn voetsporen staan in Frankrijk, Portugal, Duitsland, China, Spanje, Malta en Londen. In Brazilië nog niet, maar dat gaat er ooit van komen.</p></li>");
        jQuery('#back').css('display', 'none');
        jQuery('#next').css('display', 'block');     
    }
    else
    {
        jQuery('#members').html("<li><img src=\"images/charlotte.jpg\" alt=\"charlotte\" /><p><span class=\"blue\">Charlotte</span> - de ‘salsa’-collega<br /><br />De reiswereld is mijn wereld. Ik ben reisleidster op de Canarische Eilanden geweest, maar ik heb ook aan de ticketbalie van KLM gewerkt waar ik verantwoordelijk was voor de reizen van het personeel.<br /><br />Ik ben verslingerd aan landen waar salsa mensen samenbrengt: Cuba, Curaçao, Dominicaanse Republiek, Brazilië, Portugal, Spanje. Maar de andere kant van de wereld lonkt ook: Azië en Australië.</p></li><li><img src=\"images/linda.jpg\" alt=\"linda\" /><p><span class=\"blue\">Linda</span> - de ‘action’-consultant<br /><br />Ik heb een jaar in Australië gewoond en gewerkt. Daarnaast heb ik twee jaar bij VCK Travel de reizen voor de scheepsbemanning geregeld. Ik hou er van om vakanties te combineren met sport. Maar ik maak er net zo graag een ‘sport’ van om een geheel andere vakantie voor onze klanten te organiseren.<br /><br />Ik heb Thailand, Nieuw-Zeeland, Australië, Italië, Spanje, Portugal en Frankrijk al aan den lijve mogen ervaren. Next stop? Sri Lanka, dat zou ik graag willen!</p></li>");
        jQuery('#next').css('display', 'none');
        jQuery('#back').css('display', 'block');  
    }
}

jQuery(window).resize(function() {
  jQuery('.section').each(function(){
    jQuery(this).css('width', jQuery(window).width() + 'px');
});
jQuery('#holcar').css('width', jQuery(window).width() + 'px');        
jQuery('.left').css('width', (jQuery(window).width() - 945) / 2 + 'px');
jQuery('#logo').css('left', (jQuery(window).width() - 945) / 2 + 'px');  
jQuery('.menu ul').css('left', (jQuery(window).width() - 945) / 2 + 210 + 'px');

if(898 - (jQuery(window).width() - 945) > 0)
{
    jQuery('#sectiona').css('width', 898 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectiona').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    
    jQuery('#sectionb').css('width', 898 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectionb').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
}

if(904 - (jQuery(window).width() - 945) > 0)
{
    jQuery('#sectionc').css('width', 904 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectionc').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
}

if(901 - (jQuery(window).width() - 945) > 0)
{
    jQuery('#sectiond').css('width', 901 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectiond').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
    
    jQuery('#sectionf').css('width', 901 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectionf').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
}

if(899 - (jQuery(window).width() - 945) > 0)
{
    jQuery('#sectione').css('width', 899 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectione').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
}

if(900 - (jQuery(window).width() - 945) > 0)
{
    jQuery('#sectiong').css('width', 899 - (jQuery(window).width() - 945) + 'px');   
    jQuery('#sectiong').css('backgroundPosition', '-'+ ((jQuery(window).width() - 945) / 2) + 'px' + ' 0px');
}



jQuery('.right').css('width', (jQuery(window).width() - 945) / 2 + 'px');
});

function showContent(){
setTimeout("displaycontent()",500);
}

function displaycontent()
{
    //hide loading status...
    //document.getElementById("loading").style.display='none';
    //jQuery('body').css('background-color', '#fbf9fa');

    //show content
    document.getElementById("my-glider").style.visibility="visible";      
    
}

function strpos (haystack, needle, offset) {
    // Finds position of first occurrence of a string within another  
    // 
    // version: 1009.2513
    // discuss at: http://phpjs.org/functions/strpos    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Onno Marsman    
    // +   bugfixed by: Daniel Esteban
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // *     example 1: strpos('Kevin van Zonneveld', 'e', 5);    // *     returns 1: 14
    var i = (haystack+'').indexOf(needle, (offset || 0));
    return i === -1 ? false : i;
}




