/*
(c) Allwebsites.nl 2011
info@allwebsites.nl
*/
$(document).ready(function(){
//Start fancy box link
$("a.fancy").fancybox();
$("a[rel=example_group]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'overlayColor' : '#000',
'overlayOpacity' : 0.7,
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return 'Afbeelding ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '
' + title : '') + '';
}
});
//Start big banner
$("#webshop-banner").easySlider({
auto: true,
continuous: true,
numeric: true
});
//Start dealer list
$("#dealers").easySlider({
auto: true,
continuous: true
});
//Start brand list
$("#brandlist").easySlider({
auto: true,
continuous: true
});
$("#webshop-banner li").show();
$("#brandlist li").show();
//Check skype online offline and show.
//skype();
$(".checkextra").click(checkextra);
});
//Product extra information
function checkextra()
{
var id = $(this).attr('rev');
var n = $("#extra_info"+id+":checked").length;
if(n==1)
{
$("#extra_infot"+id).show('slow');
}
else
{
$("#extra_infot"+id).slideUp('slow');
}
}
function submit_form_cc(act)
{
$("#submit_form").attr('action', act)
$('#submit_form').submit();
}
function skype()
{
$.get("?p=ajax&act=skype", function(data){
$("#skype").html(data);
});
}
function check_type()
{
if($('#dealertype').val()=='Anders namelijk')
{
$('#dealertype').attr('name', 'typeb2');
$("#dealertypevalue").html('Anders namelijk: ').show('slow');
}
else
{
$('#dealertype').attr('name' , 'typeb');
$("#dealertypevalue").hide();
}
}