var $container;
function scrollTo(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},1500);
}
$(document).ready(
function() {
$container = $("#container");
$container.wtRotator({
width:992,
height:196,
button_width:24,
button_height:24,
button_margin:4,
auto_start:true,
delay:5000,
transition:"random",
transition_speed:800,
block_size:100,
vert_size:50,
horz_size:50,
cpanel_align:"BR",
display_thumbs:false,
display_dbuttons:false,
display_playbutton:false,
display_tooltip:false,
display_numbers:false,
cpanel_mouseover:false,
text_mouseover:false
});
$("#transitions").val("random").change(
function() {
$container.updateTransition($(this).val());
}
);
$("#cpalignments").val("BR").change(
function() {
$container.updateCpAlign($(this).val());
}
);
$("#thumbs-cb").attr("checked", "checked").change(
function() {
$container.displayThumbs($(this).attr("checked"));
}
);
$("#dbuttons-cb").attr("checked", "checked").change(
function() {
$container.displayDButtons($(this).attr("checked"));
}
);
$("#playbutton-cb").attr("checked", "checked").change(
function() {
$container.displayPlayButton($(this).attr("checked"));
}
);
$("#tooltip-cb").attr("checked", "checked").change(
function() {
$container.displayTooltip($(this).attr("checked"));
}
);
$("#text-cb").attr("checked", "").change(
function() {
$container.updateMouseoverDesc($(this).attr("checked"));
}
);
$("#cpanel-cb").attr("checked", "").change(
function() {
$container.updateMouseoverCP($(this).attr("checked"));
}
);
}
);
(function ($) {
$.fn.cross = function (options) {
return this.each(function (i) {
// cache the copy of jQuery(this) - the start image
var $$ = $(this);
// get the target from the backgroundImage + regexp
var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, '');
// nice long chain: wrap img element in span
$$.wrap('')
// change selector to parent - i.e. newly created span
.parent()
// prepend a new image inside the span
.prepend('')
// change the selector to the newly created image
.find(':first-child')
// set the image to the target
.attr('src', target);
// the CSS styling of the start image needs to be handled
// differently for different browsers
if ($.browser.msie || $.browser.mozilla) {
$$.css({
'position' : 'absolute',
'left' : 0,
'background' : '',
'top' : this.offsetTop
});
} else if ($.browser.opera && $.browser.version < 9.5) {
// Browser sniffing is bad - however opera < 9.5 has a render bug
// so this is required to get around it we can't apply the 'top' : 0
// separately because Mozilla strips the style set originally somehow...
$$.css({
'position' : 'absolute',
'left' : 0,
'background' : '',
'top' : "0"
});
} else { // Safari
$$.css({
'position' : 'absolute',
'left' : 0,
'background' : ''
});
}
// similar effect as single image technique, except using .animate
// which will handle the fading up from the right opacity for us
$$.hover(function () {
$$.stop().animate({
opacity: 0
}, 250);
}, function () {
$$.stop().animate({
opacity: 1
}, 250);
});
});
};
})(jQuery);
$(document).ready(function () {
$("#send_contact").click(function(){
var name = $("#form_name").val();
var email = $("#form_email").val();
var message = $("#form_comment").val();
if ($("#contact_form").valid()) {
$.ajax({
type: 'POST',
url: 'http://www.adam-holmes.co.uk/ioh/1/send_contact.php',
data: {data1:name, data2:email, data3:message},
success: function(data) {
$("#contact").html("