$.fn.selectCustomizer=function(c){var a=$(c.normalSelectID);var e=$(c.jsSelectID);var g=$(c.menuContID);var d=$(c.linkContID);var b=$(c.textContID);var f=$(c.menubotContID);g.bind("focus",function(){return false});a.css("display","none");e.css("display","block");e.bind("click",function(h){if(g.css("display")=="none"){g.slideDown("fast",function(){g.css("display","block");if(f.offset().top+10>($(window).scrollTop()+$(window).height())){heightdiff=f.offset().top-$(window).height()+10;$.scrollTo(heightdiff,500,{axis:"y"})}});g.focus();h.stopPropagation();$("body").bind("click",function(){g.slideUp("fast");$("body").unbind("click");return false});d.children().bind("click",function(i){$(this).siblings().removeClass("selected");$(this).addClass("selected");b.html($(this).html());a.get(0).selectedIndex=$(this).attr("rel");g.slideUp("fast");$("body").unbind("click");i.stopPropagation();return false})}else{g.slideUp("fast");$("body").unbind("click")}return false})};
$(document).ready( function() {

    var options = {normalSelectID: '#domainTLD',
		    jsSelectID:	    '#domainbarDomSelect',
		    menuContID:	    '#domainbarDomOptionsCont',
		    linkContID:	    '#domainbarDomOptions',
		    textContID:	    '#domainbarDomSelect > div',
		    menubotContID:  '#domainbarDomOptionsBot'
    };

    $('#domainbarDomSelectCont').selectCustomizer(options);

    $('#domainbarGo').bind('click', function(e) {
        e.preventDefault();
        $('#domainSearch').submit();
        return false;
    });

    $('#domainSearch').submit(function(e){
        if ($.trim($('#domainName').val()) === '') {
            $('#domainbarInputError').html('Παρακαλώ εισάγετε το domain name που επιθυμείτε να αναζητήσετε');
            e.preventDefault();
            return false;
        }
    });

    $('#domainname').inputHint('domainbarDomainNameOverlay').blur();

});
$(document).ready(function(){

var effect = 'fade'
if ($.browser.msie && parseInt($.browser.version.substr(0,1)) <= 8)
    effect = 'slide';

$("#slideshowNav > ul").tabs("#slideshow > div.slideshowSlide", {
	current: 'selected',
	effect: effect,
	fadeOutSpeed: 'fast',
	rotate: true,
	history: false
    }).slideshow({
	autoplay: true,
	autopause: true,
	clickable: false,
	api: true,
	interval: 10000
    });
        
    $("#slideshowNav ul li").bind("click", function(e){
	var api = $("#slideshowNav > ul").data("slideshow");
	api.stop();
	e.preventDefault();
    });

});

