stored2 = 0;
stored = '';
var currentURL = window.location;
var murl = currentURL.pathname;



function propergateformfeild(idname,valuetext){
values = jQuery(idname).attr('value');
if(values != valuetext && values == ""){
jQuery(idname).attr('value',valuetext);

jQuery(idname).click(function(){
values = jQuery(idname).attr('value');
if(values == valuetext){

jQuery(idname).attr('value','');

}

});}}

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


jQuery(document).ready(function() {



propergateformfeild('#posted-name','name');
propergateformfeild('#posted-email','e-mail');
propergateformfeild('#posted-tel','tel');
propergateformfeild('#search input','Search Website');
jQuery('#slideshow ul').innerfade({
					speed: 2000,
					timeout: 4000,
					type: 'random',
					containerheight: '321px'
				});
jQuery('#slideshow2 ul').innerfade({
					speed: 2000,
					timeout: 4000,
					type: 'random',
					containerheight: '185px'
				});

jQuery('#subpages a').eq(1).css('border-top','0px');





jQuery('a.sub_m').click(function(){


if(stored2 == 0){

//stored = jQuery(this).attr('href');
//jQuery(this).attr('href','#');
//jQuery('.sub').hide();
//stored2 = 1; 

}else{

//if(stored2 != 3){

//jQuery(this).attr('href',stored);
//jQuery('.sub').show();
//stored2 = 0; 


//}


}


});

jQuery('#subpages a').eq(0).css('border-top','0px');
	jQuery("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 6, mouseDownSpeedBooster: 3, autoScroll: "always", autoScrollDirection: "endlessloop", autoScrollSpeed: 1, visibleHotSpots: "onstart", hotSpotsVisibleTime: 9, startAtElementId: "startAtMe"});

});

