(function($){$.fn.filestyle=function(options){var settings={width:250};if(options){$.extend(settings,options);};return this.each(function(){var self=this;var wrapper=$("<div class='button-click ie'>").css({"width":settings.imagewidth+"px","height":settings.imageheight+"px","background":"url("+settings.image+") 0 0 no-repeat","background-position":"right","display":"inline","position":"absolute","overflow":"hidden", "margin-left":"7px"});var filename=$('<input class="file">').addClass($(self).attr("class")).css({"display":"inline","width":settings.width+"px"});$(self).before(filename);$(self).wrap(wrapper);$(self).css({"position":"relative","height":settings.imageheight+"px","width":settings.width+"px","display":"inline","cursor":"pointer","opacity":"0.0"});if($.browser.mozilla){if(/Win/.test(navigator.platform)){$(self).css("margin-left","-142px");}else{$(self).css("margin-left","-168px");};}else{$(self).css("margin-left",settings.imagewidth-settings.width+"px");};$(self).bind("change",function(){filename.val($(self).val());});});};})(jQuery);
$(function(){
    $('#cssdropdown li.my-orders').hover(
        function() { $('ul', this).css('display', 'block'); },
        function() { $('ul', this).css('display', 'none'); });
});

this.screenshotPreview = function(){
    xOffset = 5;
    yOffset = 5;

    var relic = null;
    var iarray = null;

    $("a.preview-link").hover(function(e){
            this.t = this.title;
            this.title = "";
            relic = this.rel;
            iarray = relic.split(' x ');
            $("body").append("<p id='preview-wrapper'><span class='preview-inner'>"+ this.rel +"</span></p>");
            $("#preview-wrapper")
                    .css("top",(e.pageY + xOffset) + "px")
                    .css("left",(e.pageX - (iarray[0]/2)) + "px")
                    .css("width",iarray[0] + "px")
                    .css("height",iarray[1] +"px" )
                    .fadeIn("fast");
    }, function(){
                this.title = this.t;
                $("#preview-wrapper").remove();
    });
    $("a.preview-link").mousemove(function(e){
            $("#preview-wrapper")
                    .css("top",(e.pageY + xOffset) + "px")
                    .css("left",(e.pageX + yOffset-iarray[0]/2) + "px");
    });
};

$(function() {
    $('#login-button, #send-button').click(function(){
        $(this).parents('form').submit();
        return false;
    });
})
