/**
 * Created by IntelliJ IDEA.
 * User: maximedewelle
 * Date: 20 aožt 2010
 * Time: 13:13:56
 */
jQuery.noConflict();

jQuery(document).ready(function() {
    jQuery('#homeSlider').jcarousel({
        // Configuration goes here
    });
    jQuery('#flickrSlider').jcarousel({
        // Configuration goes here
    });


    // Scrollable zone

    jQuery("#browsable").scrollable().navigator();

    // main vertical scroll
    jQuery("#main").scrollable({

        // basic settings
        vertical: true,

        // up/down keys will always control this scrollable
        keyboard: 'static',

        // assign left/right keys to the actively viewed scrollable
        onSeek: function(event, i) {
            horizontal.eq(i).data("scrollable").focus();
        }

    // main navigator (thumbnail images)
    }).navigator("#main_navi");

    // horizontal scrollables. each one is circular and has its own navigator instance
    var horizontal = jQuery(".scrollable").scrollable({ circular: true }).navigator(".navi");


    // when page loads setup keyboard focus on the first horzontal scrollable
    horizontal.eq(0).data("scrollable").focus();



});



function tog(obj) {

	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

function enquiryDisplayOther(e){
    if(e.value=='other'){
        $('bloc_occupation_other').style.display = 'block';
    } else {
        $('bloc_occupation_other').style.display = 'none';   
    }
}

Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('h3 a');
Cufon.replace('#topNav ul li a');

window.addEvent('domready', function() {
    SqueezeBox.assign($$('a[rel=widget]'), {
            size: {x: 375, y: 400},
            handler:'iframe'
    });

    SqueezeBox.assign($$('a[rel=video]'), {
            size: {x: 540, y: 340},
            handler:'iframe'
    });

    SqueezeBox.assign($$('a[rel=emailForm]'), {
            size: {x: 400, y: 450},
            handler:'iframe'
    });

    SqueezeBox.assign($$('a[rel=pic]'));
});
